Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Create a new graphic via the menu bar: Graphics -> New Graphic.

The FullForm expression for this graphic is:

Graphics[{}, ContentSelectable -> True, ImageSize -> {480, 360}, PlotRange -> {{0, 4/3}, {0, 1}}]

Using the Drawing Tools palette, the entire area of the newly created graphic is editable:

fullyeditable

Suppose now I want to make a new graphic but make it taller; that is, I want a new graphic but with dimension 480 x 800. I can do so with Graphics[{}, ImageSize -> {480, 800}] but only a small part of it is editable.

noteditable

If I add a PlotRange, for example, Graphics[{}, ImageSize -> {480, 800}, PlotRange -> {{0, 1}, {0, 4/3}}], the editable area increases.

noteditable2

To make the entire area editable, I can change PlotRange to {{0, 1}, {0, 5/3}}.

noteidtable3

If I change ImageSize, is there a systematic way to choose PlotRange to make the entire area editable? Other approaches are also welcome.

share|improve this question
    
Does PlotRange -> All work? –  rm -rf Oct 10 '13 at 23:56

1 Answer 1

up vote 1 down vote accepted

Adding AspectRatio -> Full fixes this behavior:

Graphics[{}, ImageSize -> {480, 800}, AspectRatio -> Full]

Graphics has AspectRatio -> Automatic by default and this results in addition of non-zero ImagePadding inside of ImageSize but outside of PlotRange and PlotRangePadding and because of the latter PlotRangeClipping -> False alone does not fix this behavior completely. PlotRange -> All is expected to fix this but it does not.

Instead of AspectRatio -> Full one can specify explicit AspectRatio based on ImageSize with the same effect:

Graphics[{}, ImageSize -> {400, 800}, AspectRatio -> 800/400]

Another approach would be to tune PlotRange for ImageSize with AspectRatio -> Automatic. Now the PlotRange occupies all the ImageSize and the area of the graphic and it is completely editable:

Graphics[{}, ImageSize -> {400, 800}, PlotRange -> {{0, 1}, {0, 2}}]

Another approach is to tune up both PlotRange and PlotRangePadding to occupy the complete ImageSize:

Graphics[{}, ImageSize -> {400, 800}, PlotRange -> {{0, 1}, {0, 1}}, 
 PlotRangePadding -> {0, {.5, .5}}, PlotRangeClipping -> False]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.