Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the plot range used in a piece of graphics
ResourceFunction["GraphicsBounds"][graphics] gives a list {{left,right},{bottom,top}} of the coordinates that bound all graphics primitives occurring in graphics. |
Display some graphics primitives:
In[1]:= |
Out[1]= |
Get the plot range:
In[2]:= |
Out[2]= |
Without displaying graphics:
In[3]:= |
Out[3]= |
Get a plot:
In[4]:= |
Out[4]= |
Get the plot range:
In[5]:= |
Out[5]= |
Use GraphicsBounds to get the plot range of a plot:
In[6]:= |
Out[6]= |
You can get the same information using AbsoluteOptions:
In[7]:= |
Out[7]= |
GraphicsBounds works only with 2D graphics:
In[8]:= |
Out[8]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License