dislin_test
dislin_test,
C programs which
illustrate the use of the DISLIN
scientific plotting package.
The graphics output from DISLIN can go to into a standard
graphics file, or an interactive X Window screen, or into a
generic DISLIN graphics metafile, for later processsing. The
standard graphics file formats that DISLIN recognizes include:
-
CGM, a Computer Graphics Metafile;
-
GKSL, a GKSLIN metafile.
-
PS, a PostScript file;
-
EPS,
an Encapsulated PostScript file;
-
PDF, a PDF file;
-
HPGL, a Hewlett-Packard Graphics Language file;
-
WMF, a Microsoft Windows Metafile;
-
SVG, a Scalable Vector Graphics file;
-
GIF, a Graphics Interchange File;
-
TIFF, a Tagged Image File Format file;
-
PNG, a Portable Network Graphics file;
-
PPM,
a Portable Pixel Map file;
-
BMP, a Microsoft Bit Map file;
-
an IMAGE file;
-
Tektronix, X Window, and VGA display format;
-
a DISLIN MET file, the DISLIN "metafile" format,
which can be converted later to any of the other formats;
When creating a graphics output file, please note that DISLIN
will not overwrite an existing graphics file. Instead, it will
store the new information in a file with the right extension,
but a different "first name" than you specified. For example,
if you run the first example, it will create the file
"ex01.png". If you rerun the first example, the output
will go into a file which DISLIN arbitrarily names "dislin_1.png".
To override this behavior, you must call the filmod routine
passing in the string "DELETE" first.
To use DISLIN, you must access the correct include file, DISLIN
library file, and associated X libraries. The shell scripts that
run the examples have been set up to take care of these steps
at compile and load time. If you plan to use DISLIN,
you will need to pay attention to the installation instructions so that
you set up your environment correctly!
DISLIN Levels
DISLIN is a plotting library, designed so that you can
be generating data and creating plots at the same time. This
necessarily means that you use the program by making many
subroutine calls, to define the plot type, the plot size,
the axis length, and so on. The examples below are one way
to familiarize yourself with this procedure, and the manual
has extensive explanations of how to make the plot you want.
If might be helpful, though, to note one feature of DISLIN,
(which it shares with related plotting libraries such as
the old DISSPLA library). The plotting library starts out
at "level 0". Calling an initialization routine moves you to
"level 1", at which point graphs can be defined. Defining a
graph moves you to level 2, at which point you can also define
features associated with the graph, such as axes. When you
read the manual, you will see that some plotting routines are
only allowed to be called when the plotting library has reached
a specific level.
Languages:
dislin_test is available in
a C version and
a C++ version and
a FORTRAN90 version.
Related Programs and Data:
GNUPLOT,
C programs which
illustrate how a program can write data and command files
so that gnuplot can create plots of the program results.
GRAPHICS_EXAMPLES,
C programs which
illustrate how various kinds of data can be displayed and analyzed
graphically.
MET,
a data directory which
contains examples of MET files,
a graphics file format used by the DISLIN plotting package
of Helmut Michels.
Reference:
-
Helmut Michels,
The Data Plotting Software DISLIN - version 10.4,
Shaker Media GmbH, January 2010,
ISBN13: 978-3-86858-517-9.
-
http://www.dislin.de
The DISLIN web page;
Examples and Tests:
EX01 shows how to use the CURVE routine to plot sets of (X,Y) data:
-
ex01.c, the calling program;
-
ex01_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex01_osx.txt,
the output file.
-
ex01.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex01.txt,
the output file.
-
ex01.png,
the graphics file.
EX02 shows how to use the POLAR routine to plot (R,Theta) data:
-
ex02.c, the calling program;
-
ex02_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex02_osx.txt,
the output file.
-
ex02.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex02.txt,
the output file.
-
ex02.png,
the graphics file.
EX03 shows how the SYMBOL routine can be used to generate symbols:
-
ex03.c, the calling program;
-
ex03_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex03_osx.txt,
the output file.
-
ex03.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex03.txt,
the output file.
-
ex03.png,
the graphics file.
EX04 shows five ways of plotting the same X, Y data,
using different interpolation methods.
-
ex04.c, the calling program;
-
ex04_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex04_osx.txt,
the output file.
-
ex04.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex04.txt,
the output file.
-
ex04.png,
the graphics file.
EX05 shows three ways of plotting the same X, Y data,
using different bar graph formats.
-
ex05.c, the calling program;
-
ex05_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex05_osx.txt,
the output file.
-
ex05.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex05.txt,
the output file.
-
ex05.png,
the graphics file.
EX06 shows two ways of labeling data that is
displayed as a piechart.
-
ex06.c, the calling program;
-
ex06_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex06_osx.txt,
the output file.
-
ex06.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex06.txt,
the output file.
-
ex06.png,
the graphics file.
EX07 shows how to make pie charts and bar graphs that have
a 3D thickness to them.
-
ex07.c, the calling program;
-
ex07_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex07_osx.txt,
the output file.
-
ex07.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex07.txt,
the output file.
-
ex07.png,
the graphics file.
EX07B shows how to make 3D bar graphs on a 3D range.
EX08 demonstrates available shading patterns.
-
ex08.c, the calling program;
-
ex08_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex08_osx.txt,
the output file.
-
ex08.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex08.txt,
the output file.
-
ex08.png,
the graphics file.
EX09 demonstrates the use of color contour plots.
-
ex09.c, the calling program;
-
ex09_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex09_osx.txt,
the output file.
-
ex09.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex09.txt,
the output file.
-
ex09.png,
the graphics file.
EX10 demonstrates the use of 3D surface (wiremesh) plots.
-
ex10.c, the calling program;
-
ex10_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex10_osx.txt,
the output file.
-
ex10.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex10.txt,
the output file.
-
ex10.png,
the graphics file.
EX11 demonstrates the creation of a contour plot.
-
ex11.c, the calling program;
-
ex11_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex11_osx.txt,
the output file.
-
ex11.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex11.txt,
the output file.
-
ex11.png,
the graphics file.
EX12 demonstrates the creation of a shaded contour plot.
-
ex12.c, the calling program;
-
ex12_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex12_osx.txt,
the output file.
-
ex12.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex12.txt,
the output file.
-
ex12.png,
the graphics file.
EX13 demonstrates the creation of a map plot.
-
ex13.c, the calling program;
-
ex13_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex13_osx.txt,
the output file.
-
ex13.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex13.txt,
the output file.
-
ex13.png,
the graphics file.
EX14 demonstrates the use of TeX instructions to define
mathematical formulas.
-
ex14.c, the calling program;
-
ex14_osx.sh,
commands to compile, link and run the program on an OSX system.
-
ex14_osx.txt,
the output file.
-
ex14.sh, commands to
compile, link and run the sample calling program on a LINUX system.
-
ex14.txt,
the output file.
-
ex14.png,
the graphics file.
LIFE_GRID creates a simple grid for the game of Life.
QUICKPLOT_BAR calls QPLBAR to plot a bar chart or histogram.
QUICKPLOT_COLOR calls QPLCLR to make a color plot of a matrix of data.
QUICKPLOT_CONTOUR calls QPLCON to make a contour plot of data Z(X,Y)
stored as an array.
QUICKPLOT_CURVE calls QPLOT to plot a curve.
QUICKPLOT_PIE calls QPLPIE to plot a pie char.
QUICKPLOT_SCATTER calls QPLSCA to make a scatterplot.
QUICKPLOT_SURFACE calls QPLSUR to make a 3D surface plot of data Z(X,Y)
stored as an array.
Last revised on 28 February 2014.