Presentation is loading. Please wait.

Presentation is loading. Please wait.

DISLIN A Data Plotting Library by Helmut Michels.

Similar presentations


Presentation on theme: "DISLIN A Data Plotting Library by Helmut Michels."— Presentation transcript:

1 DISLIN A Data Plotting Library by Helmut Michels

2 Helmut Michels, MPI für Sonnensystemforschung2Contents Introduction Introduction Basic Concepts Basic Concepts Introductory Routines Introductory Routines Plotting Axis Systems and Titles Plotting Axis Systems and Titles Plotting Curves Plotting Curves Parameter Setting Routines Parameter Setting Routines Elementary Plot Routines Elementary Plot Routines Business Graphics Business Graphics 3-D Colour Graphics 3-D Colour Graphics 3-D Graphics 3-D Graphics Geographical Projections and Plotting Maps Geographical Projections and Plotting Maps Contouring Contouring Widget Routines Widget Routines Quickplots Quickplots

3 Helmut Michels, MPI für Sonnensystemforschung3 Introduction / What is DISLIN? DISLIN is a high-level plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. DISLIN is a high-level plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Programming Languages:Fortran 77, Fortran 90/95, C, Perl, Python, Java Programming Languages:Fortran 77, Fortran 90/95, C, Perl, Python, Java Current Version: 10.3 (Jan. 2013) Current Version: 10.3 (Jan. 2013) First Version:1.0 (Dec. 1986) First Version:1.0 (Dec. 1986)

4 Helmut Michels, MPI für Sonnensystemforschung4 Introduction / Features 9 Vector fonts with 7 alphabets, bitmap fonts 9 Vector fonts with 7 alphabets, bitmap fonts Support of PostScript, X11 and Windows fonts Support of PostScript, X11 and Windows fonts Axis systems with various formats Axis systems with various formats Plotting of curves and legends Plotting of curves and legends 3-D colour graphics 3-D colour graphics 3-D graphics 3-D graphics Business graphics Business graphics Contours Contours Plotting maps Plotting maps Widget routines Widget routines

5 Helmut Michels, MPI für Sonnensystemforschung5 Installation UNIX/Linux gzip –d dislin-10.3.xxx.tar.gz gzip –d dislin-10.3.xxx.tar.gz tar xvf dislin-10.3.xxx.tar tar xvf dislin-10.3.xxx.tar cd dislin-10.3 cd dislin-10.3 export DISLIN=dislin_directory (i.e. /usr/local/dislin) export DISLIN=dislin_directory (i.e. /usr/local/dislin)./INSTALL./INSTALL General settings: General settings: export DISLIN=dislin_directory export DISLIN=dislin_directory LD_LIBRARY_PATH=$DISLIN:$LD_LIBRARY_PATH LD_LIBRARY_PATH=$DISLIN:$LD_LIBRARY_PATH PATH=$PATH:$DISLIN/bin PATH=$PATH:$DISLIN/bin

6 Helmut Michels, MPI für Sonnensystemforschung6 Installation Windows unzip dl_10_xx.zip (temporary directory) unzip dl_10_xx.zip (temporary directory) setup setup - choose ok - choose ok - give the installation directory - give the installation directory Global settings (Control Panel): Global settings (Control Panel): DISLIN=dislin_directory DISLIN=dislin_directory PATH=%PATH%; dislin_directory\win PATH=%PATH%; dislin_directory\win

7 Helmut Michels, MPI für Sonnensystemforschung7 Basic Concepts / Page Format Default Page: Default Page: DIN A4 Landscape Origin: Origin: Upper left corner Plot unit: [cm / 100] Plot unit: [cm / 100] Routines: Routines: SETPAG (COPT), PAGE (NXP, NYP)

8 Helmut Michels, MPI für Sonnensystemforschung8 Basic Concepts / File Formats Vector formats:GKSLIN, CGM, PS, EPS, PDF, HPGL, WMF, SVG Vector formats:GKSLIN, CGM, PS, EPS, PDF, HPGL, WMF, SVG Image formats:TIFF, GIF, PNG, PPM, BMP Image formats:TIFF, GIF, PNG, PPM, BMP Screen output:CONS, XWIN, GL Screen output:CONS, XWIN, GL Routines:METAFL (Format) Routines:METAFL (Format) SETFIL (Filename)

9 Helmut Michels, MPI für Sonnensystemforschung9 Basic Concepts / Level Structure Level 0 : before DISINI or after DISFIN Level 0 : before DISINI or after DISFIN Level 1: after DISINI or after ENDGRF Level 1: after DISINI or after ENDGRF Level 2: after GRAF, GRAFMP or POLAR Level 2: after GRAF, GRAFMP or POLAR Level 3: after GRAF3 or GRAF3D Level 3: after GRAF3 or GRAF3D

10 Helmut Michels, MPI für Sonnensystemforschung10 Basic Concepts / Program Structure Setting of page format, file format and filename (SETPAG, PAGE, METAFL, SETFIL) Setting of page format, file format and filename (SETPAG, PAGE, METAFL, SETFIL) Initialization (DISINI) Initialization (DISINI) Setting of plot parameters Setting of plot parameters Plotting of the axis system(GRAF, POLAR, GRAFMP, GRAF3, GRAF3D) Plotting of the axis system(GRAF, POLAR, GRAFMP, GRAF3, GRAF3D) Plotting the title (TITLE) Plotting the title (TITLE) Plotting data points (CURVE, CURVE3, CURV3D, BARS, PIEGRF, SURFCE, CONTUR) Plotting data points (CURVE, CURVE3, CURV3D, BARS, PIEGRF, SURFCE, CONTUR) Termination (DISFIN) Termination (DISFIN)

11 Helmut Michels, MPI für Sonnensystemforschung11 Basic Concepts / Conventions INTEGER variables begin with the character N or I INTEGER variables begin with the character N or I Character variables begin with the character C. Keywords may be specified in upper or lower case and may be shortened to four characters Character variables begin with the character C. Keywords may be specified in upper or lower case and may be shortened to four characters Other variables are REAL Other variables are REAL Arrays end with the keyword ´RAY´ Arrays end with the keyword ´RAY´

12 Helmut Michels, MPI für Sonnensystemforschung12 Initialization and Termination Initialization: CALL DISINI () Initialization: CALL DISINI () Termination:CALL DISFIN () Termination:CALL DISFIN () Termination of Termination of an axis system:CALL ENDGRF ()

13 Helmut Michels, MPI für Sonnensystemforschung13 Plotting Text and Numbers MESSAG (CSTR, NX, NY) plots text MESSAG (CSTR, NX, NY) plots text NUMBER (X, NDEZ, NX, NY) plots a number NUMBER (X, NDEZ, NX, NY) plots a number SYMBOL (NSYM, NX, NY) plots symbols SYMBOL (NSYM, NX, NY) plots symbols HEIGHT (NH) sets the character height HEIGHT (NH) sets the character height ANGLE (NANG) defines the character angle ANGLE (NANG) defines the character angle COMPLX, SIMPLX, DUPLX, define vector fonts COMPLX, SIMPLX, DUPLX, define vector fonts SERIF, HELVE, HELVES PSFONT (CFNT) defines PostScript fonts PSFONT (CFNT) defines PostScript fonts BMPFNT (CFNT) defines a bitmap font BMPFNT (CFNT) defines a bitmap font WINFNT (CFNT) defines a Windows font WINFNT (CFNT) defines a Windows font X11FNT (CFONT, COPT) defines an X11 font X11FNT (CFONT, COPT) defines an X11 font

14 Helmut Michels, MPI für Sonnensystemforschung14 Axis Systems and Titles GRAF (XA, XE, XOR, XSTP, plots an axis system GRAF (XA, XE, XOR, XSTP, plots an axis system YA, YE, YOR, YSTP) YA, YE, YOR, YSTP) POLAR (XE, XOR, XSTP,plots a polar axis system POLAR (XE, XOR, XSTP,plots a polar axis system YOR, YSTP) YOR, YSTP) TITLE () plots a title TITLE () plots a title AXSPOS (NXA, NYA) defines the position AXSPOS (NXA, NYA) defines the position AXSLEN (NXL, NYL) defines axis lengths AXSLEN (NXL, NYL) defines axis lengths TICKS (N, CAX) sets the number of ticks TICKS (N, CAX) sets the number of ticks LABELS (CSTR, CAX) defines axis labels LABELS (CSTR, CAX) defines axis labels NAME (CSTR, CAX) sets axis titles NAME (CSTR, CAX) sets axis titles AXSSCL (COPT, CAX) defines the axis scaling AXSSCL (COPT, CAX) defines the axis scaling TITLIN (CSTR, I) defines text for titles TITLIN (CSTR, I) defines text for titles

15 Helmut Michels, MPI für Sonnensystemforschung15 Plotting Curves CURVE (XRAY, YRAY, N) plots curves CURVE (XRAY, YRAY, N) plots curves INCMRK (NMRK) selects symbols or lines INCMRK (NMRK) selects symbols or lines MARKER (NHSYMB) defines a symbol MARKER (NHSYMB) defines a symbol HSYMBL ( NH ) sets the size of symbols HSYMBL ( NH ) sets the size of symbols POLCRV (COPT) sets an interpolation method POLCRV (COPT) sets an interpolation method THKCRV (N)defines curve thickness THKCRV (N)defines curve thickness CHNCRV (COPT)sets attributes that will be automatically changed by CURVE CHNCRV (COPT)sets attributes that will be automatically changed by CURVE LINTYP (N)defines line styles LINTYP (N)defines line styles COLOR (COPT)sets a colour COLOR (COPT)sets a colour

16 Helmut Michels, MPI für Sonnensystemforschung16 Plotting Curves / Example

17 Helmut Michels, MPI für Sonnensystemforschung17 Parameter Setting Routines Basic routines (resetting, file format, page control, error handling, viewport control) Basic routines (resetting, file format, page control, error handling, viewport control) Axis systems (type, position, size, scaling, labels, ticks, titles, colours, clipping) Axis systems (type, position, size, scaling, labels, ticks, titles, colours, clipping) Colours (foreground, colour tables, utility routines) Colours (foreground, colour tables, utility routines) Text and numbers Text and numbers Fonts, alphabets Fonts, alphabets Indices and exponents Indices and exponents Instruction alphabet Instruction alphabet TeX instructions for mathematical formulas TeX instructions for mathematical formulas Curve attributes Curve attributes Line attributes Line attributes Shading Shading Base transformations Base transformations Shielded regions Shielded regions

18 Helmut Michels, MPI für Sonnensystemforschung18 Elementary Plot Routines MESSAG (CSTR, NX, NY) plots text MESSAG (CSTR, NX, NY) plots text NUMBER (X, NDEZ, NX, NY) plots numbers NUMBER (X, NDEZ, NX, NY) plots numbers SYMBOL (NSYM, NX, NY) plots symbols SYMBOL (NSYM, NX, NY) plots symbols LINE (NX, NY, NU, NV) plots a line LINE (NX, NY, NU, NV) plots a line RECTAN (NX, NY, NW, NH) plots rectangles RECTAN (NX, NY, NW, NH) plots rectangles CIRCLE (NX, NY, NR) plots circles CIRCLE (NX, NY, NR) plots circles ELLIPS (NX, NY, NA, NB) plots ellipses ELLIPS (NX, NY, NA, NB) plots ellipses VECTOR (NX, NY, NU, NV, IVEC)plots vectors VECTOR (NX, NY, NU, NV, IVEC)plots vectors AREAF (NXRAY, NYRAY, N) plots polygons AREAF (NXRAY, NYRAY, N) plots polygons RLMESS, RLNUMB, RLSYMB,are analogous routines for RLMESS, RLNUMB, RLSYMB,are analogous routines for RLINE, RLREC, RLCIRC,user coordinates RLELL, RLVEC, RLAREA

19 Helmut Michels, MPI für Sonnensystemforschung19 Business Graphics / Bar Graphs BARS (XRAY, Y1RAY, plots bar graphs BARS (XRAY, Y1RAY, plots bar graphs Y2RAY, N) Y2RAY, N) BARTYP (COPT) defines vertical or horizontal bars BARTYP (COPT) defines vertical or horizontal bars BARWTH (XWTH) defines the width of bars BARWTH (XWTH) defines the width of bars LABELS (COPT, ´BARS´) sets labels LABELS (COPT, ´BARS´) sets labels LABPOS (COPT, ´BARS´) defines the position of labels LABPOS (COPT, ´BARS´) defines the position of labels LABDIG (N, ´BARS´) sets the number of decimal places in labels LABDIG (N, ´BARS´) sets the number of decimal places in labels LABCLR (NCLR, ´BARS´) defines the colour of labels LABCLR (NCLR, ´BARS´) defines the colour of labels

20 Helmut Michels, MPI für Sonnensystemforschung20 Business Graphics / Pie Charts PIEGRF (CBUF, NLIN, plots pie charts PIEGRF (CBUF, NLIN, plots pie charts XRAY, N) PIETYP (COPT) defines 2-D or 3-D pie charts PIETYP (COPT) defines 2-D or 3-D pie charts LABELS (COPT, ´PIE´) defines labels LABELS (COPT, ´PIE´) defines labels LABPOS (COPT, ´PIE´) sets the position of labels LABPOS (COPT, ´PIE´) sets the position of labels LABDIG (N, COPT) sets the number of decimal places in labels LABDIG (N, COPT) sets the number of decimal places in labels LABCLR (NCLR, ´PIE´) sets the colour of labels LABCLR (NCLR, ´PIE´) sets the colour of labels PIECLR (N1RAY, N2RAY, N) defines colours for single pies PIECLR (N1RAY, N2RAY, N) defines colours for single pies PIEEXP ()enable exploded pies PIEEXP ()enable exploded pies

21 Helmut Michels, MPI für Sonnensystemforschung21 Business Graphics / Example

22 Helmut Michels, MPI für Sonnensystemforschung22 3-D Colour Graphics GRAF3 (XA, XE, XOR, XSTP, plots a 3-D axis system where the GRAF3 (XA, XE, XOR, XSTP, plots a 3-D axis system where the YA, YE, YOR, YSTP,Z-axis is plotted as a colour bar YA, YE, YOR, YSTP,Z-axis is plotted as a colour bar ZA, ZE, ZOR, ZSTP) ZA, ZE, ZOR, ZSTP) CURVE3 (XRAY, YRAY, ZRAY, N) plots data points CURVE3 (XRAY, YRAY, ZRAY, N) plots data points CRVMAT (ZMAT, NX, NY, plots a coloured surface CRVMAT (ZMAT, NX, NY, plots a coloured surface IXP, IYP)according to a matrix IXP, IYP)according to a matrix CRVTRI (XRAY, YRAY, ZRAY, N, plots the surface of a Delaunay CRVTRI (XRAY, YRAY, ZRAY, N, plots the surface of a Delaunay I1RAY, I2RAY, I3RAY, NTRI)triangulation I1RAY, I2RAY, I3RAY, NTRI)triangulation SETRES (NW, NH) defines the size of rectangles SETRES (NW, NH) defines the size of rectangles SHDMOD (COPT, CURVE) selects symbols or rectangles SHDMOD (COPT, CURVE) selects symbols or rectangles AX3LEN (NXL, NYL, NZL) defines axis lengths AX3LEN (NXL, NYL, NZL) defines axis lengths WIDBAR (NW) sets the width of colour bars WIDBAR (NW) sets the width of colour bars NOBAR () suppresses the plotting of the colour bar NOBAR () suppresses the plotting of the colour bar COLRAN (NCA, NCE) defines the range of colours used COLRAN (NCA, NCE) defines the range of colours used for colour bars

23 Helmut Michels, MPI für Sonnensystemforschung23 3-D Colour Graphics / Example

24 Helmut Michels, MPI für Sonnensystemforschung24 3-D Graphics / Axis System GRAF3D (XA, XE, XOR, XSTP, plots an axis system GRAF3D (XA, XE, XOR, XSTP, plots an axis system YA, YE, YOR, YSTP, ZA, ZE, ZOR, ZSTP) GRID3D (NX, NY, COPT) plots a grid in the 3-D box GRID3D (NX, NY, COPT) plots a grid in the 3-D box AXIS3D (XLEN, YLEN, ZLEN) defines the lengths of the 3-D box AXIS3D (XLEN, YLEN, ZLEN) defines the lengths of the 3-D box VIEW3D (XVU, YVU, ZVU, COPT) sets the viewpoint VIEW3D (XVU, YVU, ZVU, COPT) sets the viewpoint VFOC3D (XFOC, YFOC, ZFOC, defines the focus point VFOC3D (XFOC, YFOC, ZFOC, defines the focus point COPT) COPT) VUP3D (ANG)defines the rotation of the camera around the viewing axis VUP3D (ANG)defines the rotation of the camera around the viewing axis ANG3D (ANG) specifies the field of view of the lens ANG3D (ANG) specifies the field of view of the lens

25 Helmut Michels, MPI für Sonnensystemforschung25 3-D Graphics / Plotting Data CURV3D (XRAY, YRAY, ZRAY, N) plots curves CURV3D (XRAY, YRAY, ZRAY, N) plots curves SURFCE (XRAY, N, YRAY, M, plots a surface grid of a matrix SURFCE (XRAY, N, YRAY, M, plots a surface grid of a matrix ZMAT) ZMAT) SURFUN (ZFUN, IXP, XDEL, plots a surface grid of a function SURFUN (ZFUN, IXP, XDEL, plots a surface grid of a function IYP, YDEL) IYP, YDEL) SURSHD (XRAY, NX, YRAY, NY,plots a shaded surface from a SURSHD (XRAY, NX, YRAY, NY,plots a shaded surface from a ZMAT)matrix ZMAT)matrix SURFCP (ZFUN, TMIN, TMAX, TSTP, plots a surface of a parametric SURFCP (ZFUN, TMIN, TMAX, TSTP, plots a surface of a parametric UMIN, UMAX, USTP)function UMIN, UMAX, USTP)function SURTRI (XRAY, YRAY, ZRAY, N,plots a surface of triangulated SURTRI (XRAY, YRAY, ZRAY, N,plots a surface of triangulated I1RAY, I2RAY, I3RAY, NTRI)data I1RAY, I2RAY, I3RAY, NTRI)data SURISO (XRAY, NX, YRAY, NY, plots isosurfaces of the form SURISO (XRAY, NX, YRAY, NY, plots isosurfaces of the form ZRAY, NZ, WMAT, WLEV) f (x, y, z) = constant ZRAY, NZ, WMAT, WLEV) f (x, y, z) = constant BARS3D (XRAY, YRAY, Z1RAY, plots three-dimensional bars BARS3D (XRAY, YRAY, Z1RAY, plots three-dimensional bars Z2RAY, XWRAY, YWRAY, ICRAY, N) Z2RAY, XWRAY, YWRAY, ICRAY, N)

26 Helmut Michels, MPI für Sonnensystemforschung26 3-D Graphics / Example

27 Helmut Michels, MPI für Sonnensystemforschung27 Geographical Projections GRAFMP (XA, XE, XOR, XSTP, plots a geographical axis system GRAFMP (XA, XE, XOR, XSTP, plots a geographical axis system YA, YE, YOR, YSTP) YA, YE, YOR, YSTP) CURVMP (XRAY, YRAY, ZRAY, N)plots curves CURVMP (XRAY, YRAY, ZRAY, N)plots curves WORLD ()plots coastlines and lakes WORLD ()plots coastlines and lakes SHDMAP (CMAP) plots shaded continents SHDMAP (CMAP) plots shaded continents PROJCT (COPT) selects the geographical projection PROJCT (COPT) selects the geographical projection MAPBAS (CBAS) defines the used map data base MAPBAS (CBAS) defines the used map data base MAPFIL (CFIL) defines an external map file MAPFIL (CFIL) defines an external map file SETCBK (Routine, MYPR) enables an user-defined projection SETCBK (Routine, MYPR) enables an user-defined projection

28 Helmut Michels, MPI für Sonnensystemforschung28 Geogr. Projections / Example

29 Helmut Michels, MPI für Sonnensystemforschung29Contouring CONTUR (XRAY, N, YRAY, M, plots contours ZMAT, ZLEV)of the function Z=F(X,Y) CONTUR (XRAY, N, YRAY, M, plots contours ZMAT, ZLEV)of the function Z=F(X,Y) CONMAT (ZMAT, N, M, ZLEV) plots contours CONMAT (ZMAT, N, M, ZLEV) plots contours CONTRI (XRAY, YRAY, ZRAY, N, plots contours from CONTRI (XRAY, YRAY, ZRAY, N, plots contours from I1RAY, I2RAY, I3RAY, NTRI, ZLV) triangulated data I1RAY, I2RAY, I3RAY, NTRI, ZLV) triangulated data CONSHD (XRAY, N, YRAY, M, plots filled contours of CONSHD (XRAY, N, YRAY, M, plots filled contours of ZMAT, ZLVRAY, NLV)the function Z = F(X, Y) ZMAT, ZLVRAY, NLV)the function Z = F(X, Y) CONFLL (XRAY, YRAY, ZRAY, N, plots filled contours CONFLL (XRAY, YRAY, ZRAY, N, plots filled contours I1RAY, I2RAY, I3RAY, NTRI, from triangulated data I1RAY, I2RAY, I3RAY, NTRI, from triangulated data ZLVRAY, NLV) ZLVRAY, NLV) LABELS (COPT, CONTUR) defines labels for contours LABELS (COPT, CONTUR) defines labels for contours SHDMOD (COPT, CKEY) selects the algorithm used for SHDMOD (COPT, CKEY) selects the algorithm used for contour filling

30 Helmut Michels, MPI für Sonnensystemforschung30 Contouring / Example

31 Helmut Michels, MPI für Sonnensystemforschung31 Widget Routines WGINI (COPT, ID) creates a main widget WGINI (COPT, ID) creates a main widget WGFIN ()terminates the widget routines WGFIN ()terminates the widget routines WGBAS (IP, COPT, ID)creates a container widget WGBAS (IP, COPT, ID)creates a container widget WGLAB (IP, CSTR, ID)creates a label widget WGLAB (IP, CSTR, ID)creates a label widget WGBUT (IP, CLAB, IV, ID) creates a button widget WGBUT (IP, CLAB, IV, ID) creates a button widget WGTXT (IP, CSTR, ID)creates a text widget WGTXT (IP, CSTR, ID)creates a text widget WGFIL (IP, CLAB, CFIL, creates a file widget WGFIL (IP, CLAB, CFIL, creates a file widget CMASK, ID) CMASK, ID) WGLIS (IP, CLIS, ISEL, ID)creates a list widget WGLIS (IP, CLIS, ISEL, ID)creates a list widget WGSCL (IP, CLAB, XMIN,creates a scale widget WGSCL (IP, CLAB, XMIN,creates a scale widget XMAX, XVAL, NDEZ, ID) XMAX, XVAL, NDEZ, ID) WGDRAW (IP, ID) creates a draw widget WGDRAW (IP, ID) creates a draw widget WGPBUT (IP, ID) creates a push button widget WGPBUT (IP, ID) creates a push button widget WGPBAR (IP, XMIN, creates a progress bar WGPBAR (IP, XMIN, creates a progress bar XMAX, XSTP, ID) XMAX, XSTP, ID) WGTBL (IP, N, M, ID)creates a table widget WGTBL (IP, N, M, ID)creates a table widget

32 Helmut Michels, MPI für Sonnensystemforschung32 Widget Routines / Example 1

33 Helmut Michels, MPI für Sonnensystemforschung33 Widget Routines / Example 2

34 Helmut Michels, MPI für Sonnensystemforschung34 Quick Plots QPLOT (XRAY, YRAY, N) curve plot QPLOT (XRAY, YRAY, N) curve plot QPLSCA (XRAY, YRAY, N) scatter plot QPLSCA (XRAY, YRAY, N) scatter plot QPLBAR (XRAY, N) plots a bar graph QPLBAR (XRAY, N) plots a bar graph QPLPIE (XRAY, N) plots a pie chart QPLPIE (XRAY, N) plots a pie chart QPLCLR (ZMAT, NX, NY) 3-D colour plot QPLCLR (ZMAT, NX, NY) 3-D colour plot QPLSUR (ZMAT, N, M) surface plot QPLSUR (ZMAT, N, M) surface plot QPLCON (ZMAT, N, M, NLV) contour plot QPLCON (ZMAT, N, M, NLV) contour plot


Download ppt "DISLIN A Data Plotting Library by Helmut Michels."

Similar presentations


Ads by Google