# ImageDimensions[Plot[something]] : where does ratio 1.666... come from

From my knowledge, ImageSize is an option that adjust the width of an image.

Plot[x, {x, 0, 1}, PlotRange -> {{0, 1}, {0, 1}}, Axes -> False,
AspectRatio -> Automatic, ImageSize -> 100] // ImageDimensions

{167,167}

Plot[x, {x, 0, 1}, PlotRange -> {{0, 1}, {0, 1}}, Axes -> False,
AspectRatio -> Automatic, ImageSize -> 1000] // ImageDimensions

{1667,1667}


The numbe 167, 1667 may be related to 5/3 = 1.66666......

I think it would be better if the result was {100,100} and {1000,1000}.

Where does the ratio 1.66666...... come from ?

• Why aren't you using Rasterize[]? Jul 10, 2022 at 14:31

## UPDATE

Ian Hojnicki clarifies in the comments:

It’s not really magnification. It’s just how you convert points into pixels. They are different units after all. – ihojnicki

Therefore, what I call "magnification" in the original answer should be called "conversion factor" from points to pixels.

SystemInformation["Devices", "ConnectedDisplays"]


On my system the display scale is set to 100% under the "Display" in the Windows "Settings" application, and your code returns Ceiling[size*96/72.]:

Plot[x, {x, 0, 1}, PlotRange -> {{0, 1}, {0, 1}}, Axes -> False, AspectRatio -> Automatic,
ImageSize -> 1000] // ImageDimensions

{1334, 1334}

Table[Ceiling[size*96/72.], {size, {100, 1000, 10000}}]

{134, 1334, 13334}


Probably your display scale is set to 125%, and hence you get the value Ceiling[size*1.25*96/72.]:

Table[Ceiling[size*1.25*96/72.], {size, {100, 1000, 10000}}]

{167, 1667, 16667}