In my opinion it seems the more supported among the library with binding for FORTRAN77 e 90
PLPlot Web Site
a wiki is available too:
Documentation
The on line documentation is at the following address:
Installation
After a carefully reading of the
CMake wiki page (present in the INSTALL file too) it is necessary to install the development version of various package like
X11, octave etc.. and obviously the compilers ...
The analysis of the out-file of the cmake command has the following notes:
- -- SWIG was not found. Please specify Swig executable location ; information at the link SWIG wiki page; It seems that it is needed for binding other than the fortran one so it could be discarded:
- -- WARNING: swig not found. Disabling java bindings
- -- WARNING: swig not found. Disabling python bindings
- CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found... the export command was issued only for the FORTRAN compiler. The C++ compiler is needed by the octave binding but for that you should have the source installation of octave with header file and sources...
- the name of the C++ compiler in opensuse 11.2 system is g++
- the same error for the ADA compiler that is not prensent in my system
- -- WARNING: libltdl library not found. Setting ENABLE_DYNDRIVERS OFF. This library is contained in the standard opensuse-11.2 distribution but after creating the link to
- Fonts not found - disabling freetype package available on opensuse...
- to use png driver the pango development package have to be installed and with it the GTK2 development package
After adding the proper link in /usr/lib64 do not change the above error an probably the fonts are not installed the compliant remain after the installation of the freetype library.
This is the installation tree
CMAKE_INSTALL_PREFIX: $HOME/lib
CMAKE_INSTALL_EXEC_PREFIX $HOME/lib
CMAKE_INSTALL_BINDIR $HOME/lib/bin
CMAKE_INSTALL_DATADIR $HOME/lib/share
CMAKE_INSTALL_LIBDIR $HOME/lib/lib
CMAKE_INSTALL_INCLUDEDIR $HOME/lib/include
CMAKE_INSTALL_INFODIR $HOME/lib/share/info
CMAKE_INSTALL_MANDIR $HOME/lib/share/man
Not-withstanding the errors listed above the interactive test
run smoothly
PLplot Data Types
Here some interesting information about data types used in PLplot, above all the naming convention about single or double precision real number representation
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.5/c.html
From the
plplot-5.9.5/bindings/f95/READMEf95.txt
file there are
- parameters including number data type (single or double precision is chosen at the library compilation time):
.........
The parameters are:
- PLFLT or PLF for short
This is the KIND parameter for all floating-point variables and values
used by the PLplot library. See the example below for its use
- PL_PARSE_FULL
A parameter used in the call to PLPARSEOPTS
- PL_PI
The approximation of the number "pi". It is used in many examples
and because it is often defined in other modules as well, we have
given it a more specific name.
...
- PL_GRID_CSA, PL_GRID_DTLI, PL_GRID_NNI, PL_GRID_NNIDW, PL_GRID_NNLI,
PL_GRID_NNAIDW
Parameters that select the gridding algorithm for PLGRIDDATA
- PL_JUST_NONE, PL_JUST_OPTIMAL, PL_JUST_SAME, PL_JUST_ISOMETRIC:
The justification of axes in PLENV. The names should be more or
less self-explanatory.
- PL_AXIS_NOTHING - no decoration for the axis
PL_AXIS_BOX_ONLY - only the axles
PL_AXIS_NORMAL = ordinary axes
PL_AXIS_ATZERO = include lines through 0-coordinates
PL_AXIS_MAJORGRID = include grid for major tickmarks
PL_AXIS_MINORGRID = include grid for major and minor tickmarks
PL_AXIS_LOGX = use logarithmic X axis
PL_AXIS_LOGY = use logarithmic Y axis
PL_AXIS_LOGXY = both axes logarithmic
You can combine the logarithmic options with the others
(except PL_AXIS_NOTHING and PL_AXIS_BOX_ONLY) by simply
adding them: PL_AXIS_LOGX+AXIS_MAJORGRID for instance
.......
Main stage and concepts
Device definition
The following action/definition can be performed before initialization (
see manual):
- explicit device definition
plsdev
, run a program builts with PLplot lists the available device
Plotting Options:
< 1> xwin X-Window (Xlib)
< 2> ps PostScript File (monochrome)
< 3> psc PostScript File (color)
< 4> xfig Xfig file
< 5> null Null device
< 6> mem User-supplied memory device
< 7> svg Scalable Vector Graphics (SVG 1.1)
< 8> xcairo Cairo X Windows Driver
< 9> pdfcairo Cairo PDF Driver
<10> pscairo Cairo PS Driver
<11> svgcairo Cairo SVG Driver
<12> pngcairo Cairo PNG Driver
<13> extcairo Cairo external context driver
- command line option internally set up
plsetopt
- sub page defintion using
plssub
, subpage is used to divide the output device plotting area into several subpages of equal size, each of which can be used separately using pladv
.
Initialization
Final step in initialization
- The routine
plinit
initializes the plotting
Viewport
After definition of
subpage it is necessary to define the portion of this subpage which is to be used for plotting the graph, this subset of the subpage is called
the viewport. All lines and symbols (except for labels drawn by plbox, plmtex and pllab)
are clipped at the viewport boundaries.
- call function
plvpor
- | The viewport boundaries can be mapped into real World using the function
plwind
In the case of plvpor
and plvpas
, the arguments are given in normalized subpage coordinates which are defined to run from 0.0 to 1.0 along each edge of the subpage. Thus for example, plvpor(0.0, 0.5, 0.5, 1.0);
uses the top left quarter of the current subpage.|
|
- The previous stage can be summed up in the command
plenv
that request only the world coordinates using standard values for the viewport and the box.
3D Plot
One more stage is due for 3D plot, to easy the view definition a 3D box have to be defined between the
world coordinates and the
viewport, This data are supplied by the
plw3d
subroutine call.
Set Colors
Two color map exist, 0 and 1.
- color map 0 is suited for background and text axis etc.. (it is discrete), colors can be chosen from color map0 using
plcol0
0 black (default background)
1 red (default foreground)
2 yellow
3 green
4 aquamarine
5 pink
6 wheat
7 grey
8 brown
9 blue
10 BlueViolet
11 cyan
12 turquoise
13 magenta
14 salmon
15 white
- background color can be set using
plscolbg
, or plscol0
before initialization
Compiler Option
The compile phase it is not documented and the
Makefile
used to compile the examples can be used to understand howto.
The following
make
variables control the process
-
LIB_TAG
control the type floating point the build process has used
-
PKG_CONFIG_ENV = PKG_CONFIG_PATH=/home/..
this make variable define the environmental variable passed to pkg-config to search for the configuration file for linking to PLplot see http://linux.die.net/man/1/pkg-config building the correct library name using LIB_TAG
-
RPATHCMD = -Wl,-rpath -Wl,/home
option for the compiler to be passed to the linker ld
see here
PLplot examples
Examples relevant to the plotting needs of NLSWE2D seem to be
- x08 3D surface
- x22 vector arrows 2D plot
--
RobertoBernetti - 26 Jan 2010