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$
9
  • 1
    $\begingroup$ Works fine with me (V10) $\endgroup$ Commented Jul 14, 2017 at 17:15
  • $\begingroup$ @eldo What do you mean? $\endgroup$ Commented Jul 14, 2017 at 17:15
  • 1
    $\begingroup$ Show[Graphics[{GrayLevel[0.4], Ellipsoid[{0, 0}, {3, 2}]}], ImageSize -> 10] gives me a tiny ellipse $\endgroup$ Commented Jul 14, 2017 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$ Commented Jul 14, 2017 at 17:20
  • $\begingroup$ @eldo Please see my edit. $\endgroup$ Commented Jul 14, 2017 at 17:30

1 Answer 1

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$
1
  • $\begingroup$ This is exactly what I wanted! Many thanks! $\endgroup$ Commented Jul 14, 2017 at 18:28

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.