Plotting equation

Moderators: cyao, michael_borland

Post Reply
libov
Posts: 32
Joined: 30 May 2013, 07:14

Plotting equation

Post by libov » 11 Aug 2015, 02:56

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

michael_borland
Posts: 2008
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Plotting equation

Post by michael_borland » 11 Aug 2015, 08:41

Slava,

See attached for an example.

--Michael
Attachments
ellipseComparison.zip
(2.96 KiB) Downloaded 395 times

libov
Posts: 32
Joined: 30 May 2013, 07:14

Re: Plotting equation

Post by libov » 12 Aug 2015, 03:09

Thanks Michael,

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

Slava

Post Reply