source: PSPA/madxPSPA/doc/usrguide/plot/plot.html @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 8.6 KB
Line 
1<head> <title>PLOT</title> <!-- Changed by: Chris ISELIN, 27-Jan-1997
2--> <!-- Changed by: Hans Grote, 25-Sep-2002 --> <!-- Changed by:
3E. T. d'Amico, 20-Oct-2004 --> </head>
4
5<body bgcolor="#ffffff">
6<center>
7EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH <IMG
8SRC="http://cern.ch/madx/icons/mx7_25.gif" align=right> <h2>PLOT</h2> </center>
9<p>
10Values contained in MAD-X tables can be plotted in the form column
11versus column, with up to four differently scaled vertical axes;
12furthermore, if the horizontal axis is the position "s" of the
13elements in a sequence, then the symbolic machine can be plotted above
14the curves as well. In certain conditions True interpolation inside
15the element is available (through calls to the Twiss module for each
16slice) .  The "environment" (interpolation, line thickness, annotation
17size, PostScript format) can be set with the <a
18href="#setplot">setplot</a> command.  <ul> <li><h4><a
19name=plot>PLOT</a></h4> <pre> plot, vaxis=vname1,vname2,..,vnamen,
20vaxis1=vname1,vname2,..,vnamen, vaxis2=vname1,vname2,..,vnamen,
21vaxis3=vname1,vname2,..,vnamen, vaxis4=vname1,vname2,..,vnamen,
22haxis=vname, hmin=real, hmax=real, vmin=reals, vmax=reals, bars=integer,
23style=integer, colour=integer, symbol=integer, noversion=logical,
24interpolate=logical, noline=logical, notitle=logical, marker_plot=logical,
25range_plot=logical, table=table_name, particle=particle1,particle2,..,particlen,
26multiple=logical, title=string, range=range, file=file_name_start,
27ptc=logical, ptc_table=table_name, trackfile=table_name; </pre> where the
28parameters have the following meaning: <ul> <li>vaxis: one or several
29variables from the table to be plotted against the (only) vertical
30axis.  <li>vaxis1: one or several variables from the table to be
31plotted against the vertical axis number 1 (out of 4 possible ones).
32<li>vaxis2: one or several variables from the table to be plotted
33against the vertical axis number 2 (out of 4 possible ones).
34<li>vaxis3: one or several variables from the table to be plotted
35against the vertical axis number 3 (out of 4 possible ones).
36<li>vaxis4: one or several variables from the table to be plotted
37against the vertical axis number 4 (out of 4 possible ones).
38<li><font color=ff0000><i>Important: vaxis and vaxisI are exclusive in
39their application!</i></font> <li>haxis: name of the horizontal
40variable <li>hmin: lower horizontal edge <li>hmax: upper horizontal
41edge; to be used, both hmin and hmax must be given.  <li>vmin:lower
42edges of vertical axes, up to four numbers <li>vmax:upper edges of
43vertical axes, up to four numbers; both vmin and vmax must be given
44for an axis to be effective.  <li>bars: 0 (default) or 1 - in the
45latter case, all curve points coming from the table are connected with
46the horizontal axis by vertical bars.  <li>style: 1 (default), 2, 3,
47or 4: curve style, being solid, dashed, dotted, and dot-dashed; a
48value of 100 makes MAD-X use these four styles in turn for successive
49curves in the same plot. If style is 0 no curve is printed between
50points.  N.B. If symbol and style are null at the same time, style is
51forced to its default value (= 1).  <li>colour: 1 (default), 2, 3, ,
52or 5: colour, being black, red, green, blue, and magenta; a value of
53100 makes MAD-X use these five colours in turn for successive curves.
54<li>symbol: 0 (default), 1, 2, 3, 4, or 5: none, dot, "+", "*",
55circle, and "x". These symbols are potted at all curve points; there
56size may have to be adapted (see below).  <li>noversion: logical,
57default=false. If set true, the information concerning the madx
58version and the date are suppressed from the title. This option frees
59more space for the user's title.  <li>interpolate: logical,
60default=false. Normally the curve points from the table are connected
61by straight lines; if "interpolate" is requested, then on-momentum
62Twiss parameters such as beta, alfa, and dispersion are interpolated
63with calls to the Twiss module inside each element, for all other
64variables splines are used to smooth the curves.  <li>noline: logical,
65default=false. If s is the horizontal variable, then the machine will
66be plotted in symbolic form above the curve plot (except for tables
67having been read back into MAD-X). This may result in a thick black
68block if the horizontal scale is too large. "noline" allows the user
69to suppress the machine plotting. 
70<li>notitle: logical, default=false. If true, suppresses the title
71line, including the information on the version and date.
72<li>marker_plot: logical, default=false. If true, plotting is done
73also at the location of marker elements. This is only useful for the
74plotting of non-continuous functions like the "N1" from the aperture
75module. Beware that the PS file might became very large if this flag
76is invoked.
77<li>range_plot: logical, default=false. Needed to allow to specify
78a plotting range also for user defined horizontal axis.
79<li>table: name of
80the table to be plotted from (default: twiss). If it is <i>track</i>,
81the data to be plotted are taken from the tracking files generated for
82each required particle as defined by the attribute
83<i>particle</i>. The name of this file has the following format: file
84name as defined by the attribute <i>trackfile</i>, the observation
85point fixed to 1 and the particle number,
86e.g. <i>testtrack.obs0001.p0003</i>.  If the required file has not
87been generated by the previous MAD-X command track, no plot is done
88for that particle.  The plot is obtained through the <i>gnuplot</i>
89package.  <font color=ff0000>N.B. the previous track command should
90contain the attribute
91<i>dump</i>. The tracking plots appends the plots to an existing file
92specified via <i>filename</i> appended by <i>.ps</i>. The user should
93make sure that this file does not exist before starting a MAD-X
94run!</font> <li>particle: one or several numbers associated to the
95tracked particles for which the specified plot has to be displayed.
96<li>multiple: logical, default=false. If true all the curves generated
97for each tracked particle are put on one plot. Otherwise there will be
98one plot for each particle.  <li>title: plot title string; if absent,
99the last overall title is used; if no such overall title as well, the
100sequence name is used.  <li>range: horizontal plot <a
101href="../Introduction/ranges.html">range</a> given by elements.
102<li>file_name: start of the file name for the Postscript file(s). Only
103the first occurrence of such a name will be used. Default is "madx" or
104"madx_track" if the <i>table</i> attribute is track.  Depending on the
105format (.ps or .eps, see below) the plots will either all be written
106into one file file_name.ps, or one per plot into file_name01.eps,
107file_name02.eps, etc.  <li>ptc: logical, default=false. If set true,
108the data to be plotted are taken from the table defined by the
109attribute <i>ptc_table</i> which is expected to be generated
110previously by the ptc package. The data belong to the column
111identified by one of the names set in the definition of the ptc twiss
112table. Interpolation is not available and the attribute
113<i>interpolate</i> has no effect.  <li>ptc_table: name of the ptc
114twiss table to be plotted from (default: ptc_twiss) <li>trackfile:
115first part of the name of the files containing tracking data for each
116particle (default: track) </ul>
117<p>
118<li><h4><a name=setplot>SETPLOT</a></h4> <pre> setplot,
119post=integer,font=integer, lwidth=real,xsize=real,ysize=real,
120ascale=real, lscale=real, sscale=real, rscale=real; </pre> where the
121parameters have the following meaning: <ul> <li>post: default = 1. If
122=1, makes one PostScript file (.ps) with all plots; if =2, makes one
123Encapsulated PostSscript file (.eps) per plot.  <li>font: there are
124two defaults: 1 for screen plotting: this uses characters made from
125polygons; -1 for PostScript files; this is Times-Italic. There are
126various fonts available for positive and negative integers, best to be
127tried out, since they will look different on different systems
128anyway. GhostView will show strange vertical axis annotations, but the
129printed versions are normally OK.  <li>lwidth: default = 1. Allows the
130user to set the curve line width.  Depends on the system as well, so
131to be tried out.  <li>xsize: bounding box size for PostScript,
132default=27 cm.  <li>ysize: bounding box size for PostScript,
133default=19 cm.  <li>ascale: annotation character height scale factor,
134default=1.  <li>lscale: axis label character height scale factor,
135default=1.  <li>sscale: curve symbol (see above) scale factor,
136default=1.  <li>rscale: axis text character height scale factor,
137default=1.  </ul>
138<p>
139<li><h4><a name=resplot>RESPLOT</a></h4> <pre> resplot; </pre> resets
140all defaults for the setplot command.  </ul>
141
142<address>
143<a href="http://www.cern.ch/Hans.Grote/hansg_sign.html">hansg</a>,
144June 17, 2002, rdemaria <a
145href="http://cern.ch/rdemaria">rdemaria</a></a>, September 2007.
146</address>
147
148</body>
Note: See TracBrowser for help on using the repository browser.