![]() ![]() ![]() There is a wealth of useful idl programmes, and generally useful tips available. A thickness of 1.0 is normal, 2.0 is double wide, etc.Everything You Always Wanted to Know About IDL The first parameter is the radius, and the second is expressed in radians.įor example, to make a polar plot, use the command: OPLOT, /POLAR, R, THETA THICKĬontrols the thickness of the lines connecting the points. The X and Y vector parameters, both of which must be present, are first converted from polar to Cartesian coordinates. It is convenient to use NSUM when there is an extremely large number of data points to plot because it plots fewer points, the graph is less cluttered, and it is quicker. On logarithmic axes a geometric average is performed. If there are m data points, then m/NSUM points are displayed. If NSUM is larger than 1, every group of NSUM points is averaged to produce one plotted point. The presence of this keyword indicates the number of data points to average when plotting. Note that the IEEE floating-point value NaN is also treated as missing data. If this keyword is present, data values less than the value of MIN_VALUE are treated as missing and are not plotted. If this keyword is present, data values greater than the value of MAX_VALUE are treated as missing and are not plotted. This argument is converted to double-precision floating-point before plotting. Plots created with OPLOT are limited to the range and precision of double precision floating-point values. If both arguments are provided, Y is plotted as a function of X. If X is not specified, Y is plotted as a function of point number (starting at zero). The system variables involving graphics and their corresponding keywords are detailed in !PI. Changing the value of a system-variable field changes the default for that particular parameter and remains in effect until explicitly changed. When specifying a keyword parameter name and value in a call that value affects only the current call, the corresponding system-variable field is not changed. Note: Many of the keyword parameters correspond directly to fields in the system variables !P, !X, !Y, or !Z. ![]() See XYOUTS Procedure for the code needed to label each line of data in the previous example. You can use the XYOUTS procedure to label data lines. See !PATH for information on modifying IDL’s path. By default, this directory is part of IDL’s path if you have not changed your path, you will be able to run the examples as described here. All of the files mentioned are located in the examples/doc/plot subdirectory of the IDL distribution. Note: If IDL does not find the batch file, the required directory may not be in your IDL search path. Loop for the three remaining scores, varying the linestyle:įOR I = 1, 3 DO OPLOT, YEAR, ALLPTS, LINE = I YTITLE = 'Fish (thousands)', XRANGE =, $ TITLE= 'Salmon Populations', XTITLE = 'Year', $ The plot in the preceding figure was produced with the following statements: Define Plot first graph. (This array is also defined by the plot01 batch file.) ALLPTS =, ,, ] Once this array is defined, the IDL array operators and functions can be applied to the entire data set, rather than explicitly referencing the particular sample.įirst, we define an n-by-4 array containing all four sample vectors. In this example, an (11, 4) array called ALLPTS is defined and contains all the scores for the four categories using the array concatenation operator. Each data set except the first was plotted with a different line style and was produced by a call to OPLOT. The figure below illustrates a plot showing all four data sets. See LINESTYLE for a table describing the line style associated with each index. This information is saved in the system variables !P, !X, and !Y and used by subsequent calls to OPLOT.įrequently, the color index, line style, or line thickness parameters are changed in each call to OPLOT to distinguish the data sets. Each call to PLOT establishes the plot window (the rectangular area enclosed by the axes), the plot region (the box enclosing the plot window and its annotation), the axis types (linear or log), and the scaling. OPLOT, SIN(D), LINESTYLE = 5, THICK = 2 OverplottingĪdditional data can be added to existing plots with the OPLOT procedure. Overplot the sine of D as a thick, dashed line: Instead, it uses the scaling established by the most recent call to PLOT and overlays a plot of the data on the existing axis. It differs from PLOT only in that it does not generate a new axis. The OPLOT procedure plots vector data over a previously-drawn plot. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |