Is there a way to find the numeric equivalents of Tiny, Small, Medium, and Large for for ImageSize? In other words, what are the integers t, s, m, and l such that, for Graphics objects, the directives

ImageSize -> t
ImageSize -> s
ImageSize -> m
ImageSize -> l

are equivalent, respectively, to the directives

ImageSize -> Tiny
ImageSize -> Small
ImageSize -> Medium
ImageSize -> Large


  • $\begingroup$ I think they produce the same result for all graphics but I'm not sure, but if that's the case: imgs = Graphics[Rectangle[{1, 1}], ImageSize -> #] & /@ {Tiny, Small, Medium, Large} and then ImageDimensions /@ imgs $\endgroup$ – C. E. Sep 5 '13 at 17:32
  • 2
    $\begingroup$ Depends on a case: Slider[.5, ImageSize -> Tiny] // Rasterize // ImageDimensions $\endgroup$ – Vitaliy Kaurov Sep 5 '13 at 17:37
  • 2
    $\begingroup$ Good point @Vitaliy, I assumed we're talking about Graphics. kjo, can you update your question and specify whether you're talking only about graphics or all situations? $\endgroup$ – Szabolcs Sep 5 '13 at 17:41
  • $\begingroup$ @Szabolcs: done (yes, I was referring to Graphics only) $\endgroup$ – kjo Sep 5 '13 at 18:06

You can obtain the sizes like this:

In[1]:= Rasterize[Graphics[{}, ImageSize -> #], "RasterSize"] & /@ {Tiny, Small, Medium, Large}

Out[1]= {{100, 100}, {180, 180}, {360, 359}, {576, 575}}

It is the horizontal size that is relevant. The vertical size will depend on the aspect ratio. Thus ImageSize -> Medium corresponds to ImageSize -> 360.

A warning: In some cases Tiny, Small, etc. do not directly correspond to numerical values, and their effect depends on the context. I do not know if this is the case for ImageSize or not (I could imagine it might depend on the screen DPI setting, but then it might not.) I'm just warning you. (An example where this happens is Arrowheads, where using numerical values causes the arrow to scale with the graphic, while using e.g. Large makes the arrow size independent of the image size.)

Edit by István:

Below is a comprehensive list of possible ImageSize specifications for various objects, with default settings:

spec = {Tiny, Small, Medium, Large, All, None, Full, 
        Automatic, {Large, Automatic}, {{Tiny}, {Medium}},
        100, {100, 100}, Scaled@.6};

   Rasterize[Graphics[{}, ImageSize -> #], "RasterSize"] & /@ spec,
   Rasterize[Graphics3D[{}, ImageSize -> #], "RasterSize"] & /@ spec,
   Rasterize[Plot[x, {x, 0, 1}, ImageSize -> #], "RasterSize"] & /@ spec,
   Rasterize[Slider[x, {0, 1}, ImageSize -> #], "RasterSize"] & /@ spec,
   Rasterize[Quiet@Pane["x", ImageSize -> #], "RasterSize"] & /@ spec
   } // Transpose, 
 TableHeadings -> {spec, {Graphics, Graphics3D, Plot, Slider, Pane}}, 
 TableDepth -> 2]

enter image description here

  • $\begingroup$ This I steal for the PlotExplorer... Very handy, and was delivered at the perfect time, thanks! $\endgroup$ – István Zachar Sep 5 '13 at 19:11
  • 1
    $\begingroup$ You're assuming the graphic is square... $\endgroup$ – Brett Champion Sep 6 '13 at 2:40
  • $\begingroup$ @Brett It is only because an empty Graphics is by default assumed to be square by Mathematica. $\endgroup$ – István Zachar Sep 6 '13 at 11:35
  • $\begingroup$ @Brett I should have mentioned that it's the horizontal size that matters. I'll update the answer. $\endgroup$ – Szabolcs Sep 6 '13 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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