3
$\begingroup$

I have the following plot:

P1=Plot[1000*Exp[-0.03*t],{t,0,100},Frame->True]

Is there a simple way to make another plot whose frame is is half the width and height of plot P1?

$\endgroup$

1 Answer 1

4
$\begingroup$

Is there a simple way to make another plot whose frame is is half the width and height of plot P1?

I do not know if I understood the question correctly. If not, will delete this. But how about using the ImageSize for this?

P1 = Plot[1000*Exp[-0.03*t], {t, 0, 100}, Frame -> True, ImageSize -> {300, 300}];

P2 = Plot[1000*Exp[-0.03*t], {t, 0, 100}, Frame -> True, ImageSize -> {150, 150}];

Grid[{{P1, P2}}]

Mathematica graphics

Do you know what size "Large" represents,

I could not find from help this information. It just says "predefined". It might be possible to find this out by making a Large size image, then search the internals of the Plot structure looking for the actual size.

But a quick test shows it is around 560 but it can depend on other factors.

Manipulate[Module[{P1, P2},
  P1 = Plot[1000*Exp[-0.03*t], {t, 0, 100}, Frame -> True, 
    ImageSize -> {p, p}];
  P2 = Plot[1000*Exp[-0.03*t], {t, 0, 100}, Frame -> True, 
    ImageSize -> Large];
  Grid[{{P1, P2}}, Spacings -> {10, 5}]
  ],
 {{p, 300, "size?"}, 100, 1000, 10, Appearance -> "Labeled"},
 TrackedSymbols :> {p}
 ]

Move the slider until the images are "same" size. This tells what Large is

Mathematica graphics

560 gives

Mathematica graphics

You can see what options Mathematica used by doing

p = Plot[1000*Exp[-0.03*t], {t, 0, 100}, Frame -> True, ImageSize -> Large]
AbsoluteOptions[p]

This shows that in this case Large used

  ImageSize -> {576., 354.747},

So the Manipulate inspection method was close. I do not know how Mathematica decides what Large is. I am sure there are lots of heuristics involved.

$\endgroup$
2
  • $\begingroup$ I will try this now, thank you! Right now the actual plot I am using has a size of ImageSize -> Automatic -> Large. Do you know what size "Large" represents, e.g., is it somewhere near {300, 300}? $\endgroup$
    – tardigrade
    Commented May 21, 2022 at 22:27
  • $\begingroup$ @tardigrade good question. I searched help and could not find what Large size is, But added a way to found out. $\endgroup$
    – Nasser
    Commented May 21, 2022 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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