Discussion:
[Maxima-discuss] Draw error?
Gunter Königsmann
2017-07-12 10:58:36 UTC
Permalink
Dear all,

In the following example on my computer the info that proportional axis
are to be used is lost if I try a big enough number of circles:

(%i9) scene:append([proportional_axes=xy],
makelist(ellipse(x,0,.1,.1,0,360),x,0,20)
);
(scene)
[proportional_axes=xy,ellipse(0,0,0.1,0.1,0,360),ellipse(1,0,0.1,0.1,0,360),ellipse(2,0,0.1,0.1,0,360),ellipse(3,0,0.1,0.1,0,360),ellipse(4,0,0.1,0.1,0,360),ellipse(5,0,0.1,0.1,0,360),ellipse(6,0,0.1,0.1,0,360),ellipse(7,0,0.1,0.1,0,360),ellipse(8,0,0.1,0.1,0,360),ellipse(9,0,0.1,0.1,0,360),ellipse(10,0,0.1,0.1,0,360),ellipse(11,0,0.1,0.1,0,360),ellipse(12,0,0.1,0.1,0,360),ellipse(13,0,0.1,0.1,0,360),ellipse(14,0,0.1,0.1,0,360),ellipse(15,0,0.1,0.1,0,360),ellipse(16,0,0.1,0.1,0,360),ellipse(17,0,0.1,0.1,0,360),ellipse(18,0,0.1,0.1,0,360),ellipse(19,0,0.1,0.1,0,360),ellipse(20,0,0.1,0.1,0,360)]
(%i10) apply(draw2d,scene);
(%o10)
[gr2d(ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse)]

10 circles still work, 20 not.

Is there anything I am doing wrong?

Thanks a lot,
and kind regards,

Gunter.
Mario Rodriguez
2017-07-12 13:42:39 UTC
Permalink
Post by Gunter Königsmann
Dear all,
In the following example on my computer the info that proportional axis
(%i9) scene:append([proportional_axes=xy],
makelist(ellipse(x,0,.1,.1,0,360),x,0,20)
);
(scene)
[proportional_axes=xy,ellipse(0,0,0.1,0.1,0,360),ellipse(1,0,0.1,0.1,0,360),ellipse(2,0,0.1,0.1,0,360),ellipse(3,0,0.1,0.1,0,360),ellipse(4,0,0.1,0.1,0,360),ellipse(5,0,0.1,0.1,0,360),ellipse(6,0,0.1,0.1,0,360),ellipse(7,0,0.1,0.1,0,360),ellipse(8,0,0.1,0.1,0,360),ellipse(9,0,0.1,0.1,0,360),ellipse(10,0,0.1,0.1,0,360),ellipse(11,0,0.1,0.1,0,360),ellipse(12,0,0.1,0.1,0,360),ellipse(13,0,0.1,0.1,0,360),ellipse(14,0,0.1,0.1,0,360),ellipse(15,0,0.1,0.1,0,360),ellipse(16,0,0.1,0.1,0,360),ellipse(17,0,0.1,0.1,0,360),ellipse(18,0,0.1,0.1,0,360),ellipse(19,0,0.1,0.1,0,360),ellipse(20,0,0.1,0.1,0,360)]
(%i10) apply(draw2d,scene);
(%o10)
[gr2d(ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse,ellipse)]
10 circles still work, 20 not.
Is there anything I am doing wrong?
Thanks a lot,
and kind regards,
Gunter.
Draw writes the same script in both cases.

It's a feature of Gnuplot to ignore proportional axes when the ratio
(range x)/ (range y) is greater than 100.

You can also compare these two outputs:

draw(
gr2d(proportional_axes=xy, explicit(sin(x),x,0,199)),
gr2d(proportional_axes=xy, explicit(sin(x),x,0,200))) $

In any case, thanks for your bug report, I was not aware of this fact.

By the way, you don't need to call 'append' in your code. This works too:

scene:[[proportional_axes=xy], makelist(ellipse(x,0,.1,.1,0,360),x,0,20)]$

The same is true for the two calls to 'append' in info/docdraw.mac
--
Mario

http://www.tecnostats.net
Gunter Königsmann
2017-07-12 17:50:34 UTC
Permalink
Post by Mario Rodriguez
draw(
gr2d(proportional_axes=xy, explicit(sin(x),x,0,199)),
gr2d(proportional_axes=xy, explicit(sin(x),x,0,200))) $
In any case, thanks for your bug report, I was not aware of this fact.
Me neither. Weird, that feature...
Post by Mario Rodriguez
scene:[[proportional_axes=xy], makelist(ellipse(x,0,.1,.1,0,360),x,0,20)]$
The same is true for the two calls to 'append' in info/docdraw.mac
That's quite of handy, actually, but I never dared to use this as I
didn't know if it is an undocumented feature that one day will go away.
Thanks a lot!

Gunter.

Loading...