Page 1 of 1

Plotting equation

Posted: 11 Aug 2015, 02:56
by libov
Dear Michael,

sorry if this is a trivial question.

For a cross-check I want to put Twiss ellipses on top of the x-xp distribution.

How do I plot a curve given by equation? (e.g. for a circle of unity radius I'd want to use x^2+y^2=1. In matlab the function is called ezplot I think)

Furthermore, how do I overlay such a curve on top of a 2D distribution plotted with sddscontour?
That's the way I'm plotting it:

Code: Select all

sddshist2d $1 $1.xxp.h2d -col=x,xp -xparam=$NBINS -yparam=$NBINS
sddscontour $1.xxp.h2d -shade=100 -noLabels
Thanks!
Slava

Re: Plotting equation

Posted: 11 Aug 2015, 08:41
by michael_borland
Slava,

See attached for an example.

--Michael

Re: Plotting equation

Posted: 12 Aug 2015, 03:09
by libov
Thanks Michael,

there's always something new to learn from your scripts 8-)

Slava