0
$\begingroup$

It could be a very silly question!

Suppose we have the simple case

p1 = ListPlot[{{-0.4, -0.24}}, PlotStyle -> {GrayLevel[0.4], PointSize[0.09]}];
p2 = Graphics[{GrayLevel[0.4], Ellipsoid[{0.9, 0.6}, {3, 2}]}];
Show[{p1, p2}, PlotRange -> All, ImageSize -> 500]

enter image description here

How can we control the size of the ellipse? I added ImageSize -> 10 but it does no have any affect...

Any ideas?

$\endgroup$
  • 1
    $\begingroup$ Works fine with me (V10) $\endgroup$ – eldo Jul 14 '17 at 17:15
  • $\begingroup$ @eldo What do you mean? $\endgroup$ – Vaggelis_Z Jul 14 '17 at 17:15
  • 1
    $\begingroup$ Show[Graphics[{GrayLevel[0.4], Ellipsoid[{0, 0}, {3, 2}]}], ImageSize -> 10] gives me a tiny ellipse $\endgroup$ – eldo Jul 14 '17 at 17:17
  • 1
    $\begingroup$ What @eldo means (I think) is that adding the option does have the effect stated in the documentation. Maybe there is an effect you're expecting that goes beyond what ImageSize does. You'd have to clarify that. $\endgroup$ – Jens Jul 14 '17 at 17:20
  • $\begingroup$ @eldo Please see my edit. $\endgroup$ – Vaggelis_Z Jul 14 '17 at 17:30
1
$\begingroup$

Maybe this is what you want?

scale = 0.1;

p1 = ListPlot[{{-0.4, -0.24}}, PlotStyle -> {GrayLevel[0.4], PointSize[0.09]}];
p2 = Graphics[{GrayLevel[0.4], Ellipsoid[{0.9, 0.6}, {3, 2} scale]}];

Show[{p1, p2}, PlotRange -> All, ImageSize -> 300]

enter image description here

You have to scale / rescale the ellipsoid, not the total graphics!

And it might be useful to specify PlotRange and PlotRangePadding:

Grid[{Table[
   Graphics[{GrayLevel[0.4], Ellipsoid[{0.9, 0.6}, {3, 2} scale]},
    PlotRange -> {{-0.5, 2}, {-0.5, 2}},
    PlotRangePadding -> 0.5,
    Axes -> True],
   {scale, 0.1, 0.5, 0.1}]}]

enter image description here

$\endgroup$
  • $\begingroup$ This is exactly what I wanted! Many thanks! $\endgroup$ – Vaggelis_Z Jul 14 '17 at 18:28

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.