Consider the following snippet of code:
Module[{pts},
pts = {{0, 0}, {0, 2}, {6, 0}};
Graphics[{Blue, Polygon[pts]}, PlotRange -> {{0, 4}, {0, 4}}]
]
A graphic is displayed that doesn't entirely fall within the plotrange.
Question : I have a Panel that displays graphics of different shapes and size. When automatic resizing of the graphic is not an option what is the best way to calculate the plotrange ( or any other suitable option ) so that graphics fit ?
PlotRange -> {{Min[pts[[All, 1]]], Max[pts[[All, 1]]]}, {Min[pts[[All, 2]]], Max[pts[[All, 2]]]}}
help (perhaps together withImageSize
)? $\endgroup$PlotRange->All
solve your problem? $\endgroup$Panel
. Can you provide the code for thatPanel
so it becomes clearer what you want to do with the graphics? $\endgroup$