[Simulations In Physics] [PGPLOT] [f77chk] [Japanese page]

GrWin Graphics Library

Version 0.99.9b

Copyright (C) 1998 - 2003 Tamaribuchi, Tsuguhiro

tamari@spdg1.sci.shizuoka.ac.jp

http://spdg1.sci.shizuoka.ac.jp/grwinlib/english/

Contents

  1. Introduction
  2. Platforms and supported compilers
  3. Mailing lists
  4. Installation
  5. How to link the library
  6. grwnd.exe
  7. PGPLOT drivers
  8. Distribution
  9. Download
  10. This version


  1. Introduction
  2. GrWin Graphics Library is a free graphics routine library for Fortran and C/C++ available on Windows Xp/2000/NT/Me/9x (x86) platforms. Using this library you can enjoy free graphics programming on Windows even if you have no experience on Windows programming. Currently supported compiler systems are as follows:

    MinGW-2.0
    Cygnus Cygwin 1.3.x
    AT&T UWIN 3.x
    GCC Development Toolchain for x86-win32 targets
    Open Watcom C/C++ and Fortran 1.0
    Borland C++ Compiler 5.5
    Digital Mars C/C++ Compilers
    Intel(R) C++/Fortran Compiler 7.1
    Microsoft Visual C++ Version 6.0
    Compaq/Digital Compaq Visual Fortran Version 6
    f2c for several C compilers

    When an application linked with the GrWin Library is running on a console window of a command prompt (DOS prompt for Windows Me/9x) as a console application, the behavior of the application on the console window is exactly the same as one without use of the graphics. That is, the use of this library does not change the character based user interfaces (CUI), such as stdin and stdout assigned to the keyboard and a console window, respectively, and instead an independent Windows application grwnd.exe, the graphics engine of GrWin, distributed with the library files is used to open graphics windows. This means that you can modify an existing program part by part to make a program for graphics. The GrWin Library can be linked also with Windows applications (GUI) written in C or C++.

    You can, though high level routines such as for graphs with hidden lines and for contour diagrams are not implemented yet in this release, do those high level graphics by installing PGPLOT with interactive drivers written using the GrWin Library.



  3. Platforms and supported compilers
  4. The GrWin Library with grwnd.exe is expected to work on any PC's where one of Windows Xp/2000/NT/Me/9x (x86) is running. In developing this project, a top priority is to make a free system, and currently main targets are MinGW-2.0 and Cygnus Cygwin 1.3.x. Other compiler systems listed in the table below are also available. Especially as f2c ( a Fortran 77 to C translator ) is supported for Intel(R) C++, Borland C/C++, Microsoft Visual C++ and Digital Mars C/C++ compilers, those users who do not have a Fortran compiler can do graphics programming by Fortran 77.

    This project has been developed specifically for Win32 platforms ( Windows Xp/2000/NT/Me/9x ), and deeply depends on the Win32 API. So there is no plan to port this to other platforms.

    Supported compiler systems
    compiler abbr. *1 FORTRAN C / C++ f2c free notes
    MinGW-2.0 MinGW g77 gcc / g++ n/a yes
    Cygnus Cygwin 1.3.x cygwin g77 gcc / g++ n/a yes
    Open Watcom C/C++ and Fortran 1.0 watcom wfl386 wcl386 n/a yes
    Borland C++ Compiler 5.5 bcc n/a bcc32 avail. yes
    Digital Mars C/C++ Compilers dmc n/a sc avail. yes
    Intel(R) C++/Fortran Compiler 7.1 Intel ifl icl avail. no *2
    Microsoft Visual C++ Version 6.0 vcpp n/a cl avail. no
    Compaq Visual Fortran Version 6 vf df n/a n/a no
    gcc-2.95.2-mingw32 (MSVCRT) mingw32m g77 gcc / g++ n/a yes *3
    gcc-2.95.2-mingw32 (CRTDLL) mingw32 g77 gcc / g++ n/a yes *3
    gcc-2.95.2-cygb20 cygb20 g77 gcc / g++ n/a yes *4
    gcc-2.95.2-uwin / AT&T UWIN 3.x uwin g77 gcc / g++ n/a *5 *6
    *1 applicabe only in the GrWin documentation
    *2 C/C++ and Fortran are independent products.
    *3 a previous version of MinGW, by Mumit Khan.
    *4 a previous beta version of Cygwin 1.n.x
    *5 not free, but educational, research, and evaluation copies available.
    *6 GrWin supports only gcc-2.95.2 under UWIN.


  5. Mailing lists
  6. By courtesy of Dr. Svensson at the European Synchrotron Radiation Facility (ESRF), the grwin@esrf.fr mailing list is available for all users of the GrWin Library. To subscribe to the list send a mail to grwin-request@esrf.fr with "subscribe" as the message body. To get a copy of the help message, send a mail to Majordomo@esrf.fr with "help" as the message body.

    Another mailing list grwin-users@spdg1.sci.shizuoka.ac.jp is also available mainly for Japanese users. Of course it is not closed for Japanese users and everyone is welcome to join it, though articles are preferable to be written in Japanese. To subscribe to the grwin-users@spdg1.sci.shizuoka.ac.jp mailing list, access here (CGI with Japanese messages), or send a mail to majordomo@spdg1.sci.shizuoka.ac.jp with

    subscribe grwin-users your_email_address
    as the message body.



  7. Installation
  8. The GrWin graphics library supports many compiler systems, and installer packages each of which is customized for a supported compiler system are available. An all-in-one installer package and a compressed tar file that includes all the distribution files, with which you can install GrWin under any supported compiler systems, are also available. It is strongly recommended that you use an installer version suited for your compiler system unless you use more than one compiler system on a computer to make GrWin applications. All the downloadable files are listed in Download.

    a. Installer packages for specific compilers

    To install GrWin using a GrWin installer package you should have at least one of the supported compiler systems installed and ready to be used. Using such a package that is suited for your compiler system, a set of GrWin files, which enables you to develop graphical applications with the included documentation, is installed quite easily in suitable separate folders by responding to some dialogs appearing in the installation process. If it is normally done you are ready to do graphics programing using the GrWin library, moreover you are ready to make PGPLOT applications on Windows if you select (by default) the PGPLOT option in a dialog. [ Users of Compaq Visual Fortran Version 6, however, have to make PGPLOT library files themselves using the GrWin toolkit because the author does not have VF installed and is not able to provide the prebuilt binaries that requires it to make. ]

    If you want to know what an installer is doing in the installation process, consult the source file lGrWn0999be-XXX.iss for the installer included in that package.

    b. All-in-one package

    If you select more than one compiler system, or select the Custom installation, in the installation process using the all-in-one installer lGrWn0999be.exe, you must set yourself the PATH environment variable because all the executables, batch files and other files that should be on the PATH are installed in a folder, the GrWin folder.

    It is possible to use some or all the other compiler systems on separate windows on a machine. If you want to know what the installer is doing in the installation process, consult the source file lGrWn0999be.iss of the installer.

    If you do not like using such an installer you can use a compressed file lGrWn0999be.tgz, where all the distribution files are compressed with tar + gzip. In this case you should do additional installation procedures such as moving or copying files into suitable folders, etc., in addition to the setting of the PATH environment variable.

    c. Testing

    If the installation has done, input the following comannd in a command prompt as a test:

    C:\GrWin> cd demo
    C:\GrWin\demo> gwF77 trigfn
    C:\GrWin\demo> gwCC polygon
    C:\GrWin\demo> dir *.exe

    Here gwF77 and gwCC should read as correct bach file names for FORTRAN and C, respectivery, depending on your compiler system(s). If you are using a compiler system based on GNU, say MinGW, gwF77 and gwCC should read as gwf77 and gwgcc, respectivery, for example.

    If you were not able to get the executable files, trigfn.exe and polygon.exe, something is wrong, and then you should do from the beginning of the above installation procedure.


    d. Uninstallation

    To uninstall a set of GrWin files installed with an installer, use Add/Remove Programs in Control Panel, where the name 'GrWin Version Version 0.99.9b for XXX' should be listed with XXX standing for a compiler system. The GrWin installers do not create any registry key, but some grwnd.ini files might be created in some folders depending on how you have launched grwnd.exe, the graphics engine of GrWin. Remove all these GrWin.ini files if you do not like them being in folders.



  9. How to build GrWin/PGPLOT executables
  10. For each of supported compiler systems a set of sample batch files is included in the corresponding distribution as mentioned in Distribution. The names, with omitted the extensions .bat's, of those sample batch files for each distribution is shown in the next table, where the symbol '(w)' stands for that the GUI counterpart of a batch file for a console window (CUI) is available with its filename followed by 'w', e.g., gwgccw for gwgcc.

    Sample batch file names for the supported compiler systems
    Supported compiler system FORTRAN C C++ PGPLOT CPGPLOT
    MinGW-2.0 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
    Cygnus Cygwin 1.3.x gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
    Open Watcom C/C++ and Fortran 1.0 gwwfl gwwcl(w)
    pggwwfl pggwwcl(w)
    Borland C++ Compiler 5.5 + f2c gwf2bcc gwbcc(w)
    pggwf2bcc pggwbcc(w)
    Digital Mars C/C++ Compilers + f2c gwf2dmc gwdmc(w)
    pggwf2dmc pggwdmc(w)
    Intel(R) C++/Fortran Compiler 7.1 ( f2c available ) gwifl gwicl(w)
    pggwifl pggwicl(w)
    Microsoft Visual C++ Version 6.0 + f2c gwf2cl gwcl(w)
    pggwf2cl pggwcl(w)
    Compaq Visual Fortran Version 6 gwdf gwcl(w)
    pggwdf pggwcl(w)
    gcc-2.95.2-mingw32 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
    gcc-2.95.2-mingw32 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
    gcc-2.95.2-cygb20 gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)
    AT&T UWIN 3.x + gcc-2.95.2-uwin gwf77 gwgcc(w) gwgpp pggwf77 pggwgcc(w)

    It should be noted in using these batch files that extensions .f for Fortran, .c for C or .cpp for C++ should be omitted as only the first argument. For example, to get an executable abc.exe from abc.f and xyz.c using g77, the GNU Fortran, you can do as follows:

    gwf77 abc xyz.c

    Similarly to get aaa.exe from aaa.c using gcc, the GNU C, and bbb.exe from bbb.cpp using g++, the GNU C++, you can do as follows:

    gwgcc aaa
    gwgccw bbb

    To make a console application (CUI) from source code, the following option should be added in linking using gcc or g77 on MinGW-2.0, Cygnus Cygwin 1.3.x, AT&T UWIN 3.x and GCC Development Toolchain for x86-win32 targets:

    -Wl,--subsystem,console -lGrWin -mwindows

    You can see similar lines in the sample batch files gwf77.bat and gwgcc.bat. To make a Windows application (GUI) using gcc or g77 the option 'console' should be replaced with 'windows' as

    -Wl,--subsystem,windows -lGrWin -mwindows

    and gwgccw.bat includes a similar line.

    To make CUI and GUI executables using other compiler systems, say VC++, refer the command lines in the corresponding batch files, e.g., gwcl.bat and gwclw.bat, respectively, for VC++.

    In the subfolders demo and pgplot in the GrWin folder, various pieces of source code are available as examples. To make all executables to the source files in those directories using a compiler based on GNU, i.e., MinGW-2.0, Cygnus Cygwin 1.3.x, AT&T UWIN 3.x or GCC Development Toolchain for x86-win32 targets, input simply

    make

    or, in the demo folder

    nmake -f make.mak

    for VC++/VF.

    Before running any executable it is recommended to see the description about grwnd.exe.



  11. grwnd.exe
  12. Is the graphics engine for the GrWin graphics library, with which almost all the features of GrWin, graphics, event handlings, printings, clip boards, etc., are implemented. When an instance of grwnd.exe is launched a main (frame) window appears on the display and then calling a series of GrWin routines corresponding graphics objects are drawn serially on a client window opening within the frame window. An instance of grwnd.exe is created when Attributes such as sizes and positions of the frame window of a grwnd.exe can be specified with command line options for grwnd.exe or in a call to GWinitx with its arguments almost equivalent to the command line options. Unless you want to specify some of these options, the third method above is the simplest and recommended. These options can be specified by several methods described below.

    From the menu bar of each frame window you can do closing, erasing and printing using a printer, etc., to an active client window as well as specifying the starting options. Important features of grwnd.exe are described as follows:

    Starting options for grwnd.exe

    As grwnd.exe has a reasonable default setting there is usually no need to specify starting options for it. If you want to customize them an initialization file ( .ini ) as well as command line options can be used. An initialization file is a text file with the extension .ini in which items for an initial setting of grwnd.exe are described. The destination .ini file is searched in the following order:

    1. the file specified from [help] → [Starting options] at the menu bar of grwnd.exe launched in advance. This also enables you to create and/or modify an .ini file interactively even if no .ini file exists.

    2. the file XXX.ini specified in the command line of grwnd.exe with arbitrary XXX

    3. YYY.ini in the same folder with the same base name YYY as the application YYY.exe

    4. grwnd.ini in the folder specified with the environment parameter GRWINDIR

    5. grwnd.ini in the same folder as the application

    6. grwnd.ini in the same folder as grwnd.exe

    If none found the default setting is used. Writing an .ini file all the available items must be in the [Defaults] section. A sample .ini file, equivalent to the default setting, is as follows:

    [Defaults]
    Storing=1
    Buffering=1
    StatusBar=1
    Inquiring=0
    Landscape=1
    #Width=800
    #Height=560
    #PointX=0
    #PointY=0
    #DefaultDPI=300
    MaxDPI=300
    #ArrangeMode=2
    #ShowMode=10
    #ZOrder=1
    
    Here the characters after '#' in a line are ignored as a comment. It should be noted that the upper limit of dpi values assumed in making an internal bitmap is specified with the MaxDPI. In the Bitmap mode with the Buffering being ON and DefaultDPI option not set, the assumed bitmap size depends on your current working printer, and a huge bitmap internally to be created may cause your computer being unstable. So do not set a too large value ( > 600 ) to the MaxDPI item unless you do know what you are doing. All the available items appear in the sample above, and you would guess meanings of them seeing the [Starting options] dialog or referring the next description about the command line options.

    Command line options for grwnd.exe

    The graphics engine grwnd.exe, which may be launched manually in advance of any GrWin application, has commandline options as follows:

    Usage: grwnd [Options] [file.ini] [file1] [file2] ...

    Options ( <..> = an integer) :
    -p<X>,<Y> Sets the position (X,Y) of the top-left corner of the main frame window in the screen coordinate.
    -s<W>,<H> Sets the size (W,H) of the bounding rectangle of the main frame window in the screen coordinate.
    -[dpi]<N> Sets the default dpi value ( N <= 1200 ) for bitmaps, etc.
    -a<N> Arranges the child windows with a mode number N (= 1..4), beeing equivalent to GWarrange (N).
       1: -cascade, 2: -horizontal, 3: -vertical, 4: -iconarrange
    -m<N> Sets the show state of the main frame window with a mode number N (= 0..14), beeing equivalent to GWshowfr (N).
       0: -hide, 1: -maximize, 2: -minimize, 3: -restore, 4: -show,
       5: -showmaximized, 6: -showminimized, 7: -showminnoactive,
       8: -showna, 9: -shownoactive, 10: -shownormal,
      11: -topmost, 12: -notopmost, 13: -top, 14: -bottom
    -z<N> Sets the Z-order of the main frame window with a mode number N (= 1..4), beeing equivalent to GWshowfr (N+10).
       1: -topmost, 2: -notopmost, 3: -top, 4: -bottom
    -t or -TTurns the storing mode ON or OFF.
    -b or -BTurns the buffering mode ON or OFF.
    -r or -RTurns showing the status bar ON or OFF.
    -i or -I   Turns the inquiring mode ON or OFF.
    -l or -L   Turns the landscape printer mode ON or OFF.

    Coordinate systems

    For each client window, grwnd.exe assumes an entire drawing rectangle, the paper, and the logical device coordinate system (LDCS) fixed on it. The origin of the LDCS is at the top-left of the paper, the horizontal axis is taken to the right, and the vertical to the bottom. On printing, the unit in the LDCS is mapped to 1 pixel on the printer if the MaxDPI value is greater than the value for the printer, otherwise a suitable scaling is made. The paper size can be specified in opening the window and is kept fixed usually.

    In an another coordinate system, the normalized logical coordinate system (NLCS), the size of the paper is normalized so as to give the unit length of the shorter side of the paper with preserving the aspect ratio. The origin is at the bottom-left of the paper in the NLCS with the vertical axis to the top.

    The view port is a temporal drawing rectangle set inside the paper defined by calling GWVPORT to specify the bottom-left and the top-right corners in the NLCS.

    The world coordinate system (WCS) is the user's coordinate system defined by calling GWINDOW to give the coordinates of the bottom-left and the top-right corners of the view port in this coordinate system. Almost all routines of the GrWin Library assume this WCS.

    View modes

    grwnd.exe has five view modes [Bitmap], [Isotropic], [Fit], [Total] and [Zoom in], and one of the modes for the active client window can be selected interactively from [Mode] at the menu bar, or by calling a routine GWVWMOD in an application. See for further details the descriptions for the submenu items for [Mode] below.

    Printing

    As grwnd.exe uses standard printing procedures for Windows, you can print the resultant or a snapshot of a graphics window drawn by your application using your running printer on Windows. So the quality of the resultant printed matter depends on the quality of the printer and the printer driver used, provided the storing mode is set on. When the storing mode is set off but the buffering mode is on, a bitmap used as an internal buffer is printed with a suitable scaling. Many printer and printer drivers seem not to support "Fill Bounded Area" function (see GWFLOOD). Printed result depends on which view mode is selected, and can be previewed from [File] -> [Print Preview]. You can choose a printer and/or set miscellaneous printer modes up from [File] -> [Print Setup].

    Outputs in metafile format

    grwnd.exe supports the enhanced metafile format ( *.emf ) on output. Metafiles can be readily embedded in documents without loss of quality if you are using MS-Word or one of many other applications that support metafiles. See below to know how to get outputs in the enhanced metafile format.

    Clipboard

    grwnd.exe supports Windows clipboard, you can copy image of a view of the active window to the clipboard and import the clipboard to a image data available in the library. See for further details the descriptions for the submenu items for [Edit] and the user's manual.

    Pause and abort

    Usually grwnd.exe works passively by receiving commands from an application to which the GrWin Library is linked, and it interprets each of them to draw graphics objects on client windows. In some cases where unexpected result was displayed or the execution time is too long, etc., you may want to pause or abort the application as soon as possible. To this end [View] -> [Pause/Abort] is useful. See the corresponding descriptions below for further information.

    Status bar

    The frame window has a status bar at the bottom, which can be turned on or off by selecting [View] -> [Status bar]. The status bar has seven panes to display information of the current window; the first is for messages, the second for window number and the mouse cursor position in the LDCS, the third for the current view in the LDCS and the fourth is for the current number of the objects stored in memory.

    Menu bar

    Activating a client window some interactive operations to the client window or the associated application can be done from the menu bar of the frame window. The menu bar has the following submenus:

    [File] ->

    [Open]: Open a saved data file and draw it on a new client window.

    [Close]: Close the active client window.

    [Save]: Save the active client window. The specified name is used if GROPENX had been calld, or a default file name is used otherwise.

    [Save as]: Save the data displayed on the active client window to a file with the name specified by a file dialog. To save the data in the enhanced metafile format set the extention of the file name 'emf'.

    [Print]: Print the active client window. The size printed on a paper depends on the view mode described below, and usually [View] -> [Bitmap] is used.

    [Print Preview]: Preview a printing image.

    [Print Setup]: Set up the printer. Usually the landscape mode is selected from here.

    [Exit]: Close the all windows including the frame window and exit. This should not be used customarily and instead use GWQUIT in each application, because it could make unexpected error messages and memory leaks in some conditions.

    [Edit] ->

    [Copy]: Copy the active current view onto the Windows clipboard as a device independent bitmap(DIB). A DIB image on the clipboard can be handled many Windows applications such as paint.exe.

    [Import Clipboard]: Import a DIB image on the clipboard into an internal array for bitmaps with the bitmap number 0, and the imported DIB image is shown on a dialog box when the inquiring mode is ON.

    [View] ->

    [Pause/Abort]: Popup a message box and pause the application associated with the active client window until a button clicked. When the Yes button is clicked the application is aborted, or continue the job when No button clicked.

    [Replay]: Redraws the active client window in the replay mode where all the object are used to replay an animation for example.

    [Redraw]: Redraws the active client window. In contrast to [Replay], minimum objects are used to refresh a rectangle on the display surface using backgrownds and the buffer, if any.

    [Flushing]: Flushes all suspended objects belonging to the active client window.

    [Clear All]: Clears the active client window and deletes all the objects belonging to it. This is equivalent to call GWERASE.

    [Storing]: Toggle setting the storing mode. Turning this mode ON, drawn graphic objects are stored in memory for later uses such as printings and many aspects of redraws.

    [Buffering]: Toggle setting the buffering mode. Turning this mode ON, redrawings of complicated graphic objects or scrollings in the [Bitmap] mode described below can be done faster.

    [Status Bar]: Toggle displaying the status bar.

    [Inquiring]: Toggle setting the inquiring mode. When this mode is ON, a dialog box appears on deleting the objects or on importing a DIB image on the clipboard

    [Mode] ->

    [Bitmap]: The unit of the LDCS matchs 1 pixel on the display. Usually, the drawing area in the LDCS (the paper) is larger than the current view size of the client window, and the view can be scrolled by the horizontal and the vertical scroll bar to see everywhere on the paper. The aspect ratio is preserved on the display.

    [Isotropic]: The view port is displayed as large as possible with preserving the aspect ratio in the current view of the client window.

    [Fit]: The bounding rectangle for all drawn objects is fit onto the current view of the client window. The aspect ratio is not preserved on the display.

    [Total]: The whole paper is fit onto the current view of the client window. The aspect ratio is not preserved on the display.

    [Zoom in]: Zoom in on any area of the paper. When selected this mode, the crosshairs cursor appears and you can drag (move mouse with the left mouse button down) it to select any area bounded with a rubber band. This operation can be repeated again and again, and may be useful in such a case where mouse coordinates are captured in a certain high precision.

    [Window] ->

    [Fit Frame]: Fits the frame size to the current view of the client window with the size of the view unchanged.

    [Top Most]: Places the frame window at topmost.

    All the other submenu items are common in Windows applications.

    [Options] ->

    [Text Font]: Popup a font dialog to set attributes of the current text font associated with the active window.

    [Symbol Font]: Popup a font dialog to set attributes of the current symbol font associated with the active window.

    [Foreground Color]: Popup a color dialog to set the current foreground color associated with the active window. This is useful to make custom colors.

    [Background Color]: Popup a color dialog to set the current background color associated with the active window.

    [Help] ->

    No help available currently. Clicking [Starting options] opens a dialog box to set starting options. The version of this grwnd.exe is shown with [About grwnd...]. With [Library Manual] the User's Manual for the Library opens provided a web browser is associated with '.html'.



  13. PGPLOT drivers
  14. A class of PGPLOT drivers, /GW and /CGW (and /GWD and /CGWD), is implemented on Windows 2000/NT/Me/9x (x86) platforms using GrWin Graphics Library Ver. 0.99.9b. The /CGW (/CGWD) driver has a color table compatible with the original distribution of the PGPLOT, whereas the background and the foreground color of the /GW (/GWD) driver are white and black, respectively. The GrWin Library is a library of graphics routines for Fortran and C developed specifically on Windows XP/2000/NT/Me/9x (x86) platforms using many compiler systems. Source code to make these drivers is available ftp://spdg1.sci.shizuoka.ac.jp/pub/GrWinlib/english/contrib/pgplot/pggw-150.tgz">here. The same source code is also available in the GrWin ToolKit, a set of source code and tools to build library files for GrWin, PGPLOT and f2c. Executable files created from the original demo programs in the distribution of PGPLOT version 5.2.0 by compiling with the supported compiler systems are available as archive files listed in the following table:

    File name Compiler system
    pggw0999b-MinGW.tgz PGPLOT files for MinGW-2.0
    pggw0999b-cygwin.tgz PGPLOT files for Cygnus Cygwin 1.3.x
    pggw0999b-watcom.tgz PGPLOT files for Open Watcom C/C++ and Fortran 1.0
    pggw0999b-f2bcc.tgz PGPLOT files for Borland C++ Compiler 5.5
    pggw0999b-f2dmc.tgz PGPLOT files for Digital Mars C/C++ Compilers
    pggw0999b-Intel.tgz PGPLOT files for Intel(R) C++/Fortran Compiler 7.1 ( f2c available )
    pggw0999b-f2vcpp.tgz PGPLOT files for Microsoft Visual C++ Version 6.0 + f2c
    pggw0999b-mingw32m.tgz PGPLOT files for gcc-2.95.2-mingw32
    pggw0999b-mingw32.tgz PGPLOT files for gcc-2.95.2-mingw32
    pggw0999b-cygb20.tgz PGPLOT files for gcc-2.95.2-cygb20
    pggw0999b-uwin.tgz PGPLOT files for AT&T UWIN 3.x + gcc-2.95.2-uwin

    If you use Compaq Visual Fortran (VF), no corresponding package is available now, but you can build all library files for it using the GrWin ToolKit or referring Karl Glazebrook's Web page [ Thanks Karl! ].

    To run executables, expand one of the archive files in a directory, and then execute each of pgdemo*.exe and cpgdemo.exe obtained. If you downloaded a file for cygwin, cygb20 or uwin, you should do running as well as making executables in a console window under the corresponding environment. To display graphics using the GrWin Library, the graphics engine grwnd.exe for GrWin is necessary to be launched. See further information here to use grwnd.exe.

    In each of the archives in the above table all files necessary to build executables under a corresponding environment are also included as well. A brief instruction for an installation under Cygwin 1.3.x is as follows:

    1. download a copy of the distribution file pggw0999b-cygwin.tgz into a directory, say /tmp

    2. unpack it in a directory, say /pgplot:

      $ mkdir /pgplot
      $ cd /pgplot
      $ tar xvfz /pgplot/pggw0999b-cygwin.tgz

    3. copy the library files into /usr/lib:

      $ cp *.a /usr/lib

    4. copy the include files into /usr/include:

      $ cp *.h /usr/include

    5. set environment variables PATH and PGPLOT_DIR. If you use bash as a shell input the following commands, which are necessary for every startups of bash and they can be in a startup file.

      $ PATH=/pgplot:$PATH
      $ export PATH
      $ PGPLOT_DIR=/pgplot
      $ export PGPLOT_DIR

    To make executables from source, batch files in the distribution are useful. Typical command lines are as follows:

    $ pggwf77.bat pgdemo1 ( to compile pgdemo1.f )
    $ pggwgcc.bat cpgdemo ( to compile cpgdemo.c )
    $ pggwcpp.bat foo ( to compile foo.cpp )



  15. Distribution
  16. Using an installer version for each of the supported compiler systems, e.g., lGrWn0999be-XXX.exe with XXX the abbreviation for a supported compiler system name, the files shown below are installed in suitable folders, while all the files for the supported compiler systems are compressed by tar+gzip in lGrWn0999be.tgz and lGrWn0999be.exe is the installer version of it. The installation of GrWin is quite easy if you use one of the installer packages and can be finished by answering to some dialogs appearing in the installation process. If you uncompressed the lGrWn0999be.tgz file you should do another installation procedures yourself by moving/copying files into suitable folders, setting the PATH environment variable, etc. If you select more than one system executing the all-in-one installer lGrWn0999be.exe you should do the PATH setting because all the executables, batch files and other files they should be on the PATH are installed in a folder, the GrWin folder. It is strongly recommended that you use one of the installer versions of packages other than the all-in-one type unless you use more than one compiler system on a computer to make GrWin applications.

    A Brief summary of the files to be installed is shown below being classified with installation folders, where {F77}, {CC} and {CPP} in batchfile names should read as corresponding abbreviated command names for FORTRAN, C and C++, respectively, under the selected supported compiler system:


    GNU * watcom  bcc   dmc  Intel vcpp vf
    {F77} f77 wfl n/a n/a ifl n/a df
    {CC} gcc wcl bcc dmc icl cl  n/a 
    {CPP} gpp wcl bcc dmc icl cl n/a
    * GNU = MinGW, cygwin, uwin, mingw32m, mingw32, ctgb20

    a. GrWin folder

    File nameContents
    README.html README file in HTML
    README.txt README file as plain text
    lGrWn0999b.html User's Manual in HTML
    lGrWn0999b.txt User's Manual as plain text
    f77chk.txta brief note for f77chk, a bundled source code checker for Fortran 77
    demo\a directory including source code for examples using GrWin
    pgplot\a directory including files that are necessary to run PGPLOT applications and source code for the original PGPLOT demos
    lGrWn0999b-XXX.issthe source file for the installer used
    unins000.exe the executable for the uninstaller itself
    unins000.dat data file used by the uninstaller
    GrWin.ico icon file used by the uninstaller

    b. Bin folder

    File nameContents
    grwnd.exe the graphics engine of GrWin
    grwnd.ini a default .ini file for grwnd.exe
    f2c.exe the executable for f2c
    f77chk.plthe perl script for f77chk
    library.defa definition file for f77chk
    gw{F77}.bat a sample batch file to create an executable from Fortran source file(s).
    gw{CC}.bat a sample batch file to create an executable (CUI) from C source file(s).
    gw{CC}w.bat a sample batch file to create an executable (GUI) from C source file(s).
    gw{CPP}.bat a sample batch file to create an executable (CUI) from C++ source file(s).
    gw{CPP}w.bat a sample batch file to create an executable (GUI) from C++ source file(s).
    gwf2{CC}.bat a sample batch file to create an executable from Fortran source file(s) using f2c with the {CC} compiler.
    pggw{F77}.bat a sample batch file to create an executable linked with the PGPLOT library from Fortran source file(s)
    pggw{CC}.bat a sample batch file to create an executable (CUI) linked with the PGPLOT library from C source file(s).
    pggw{CC}w.bat a sample batch file to create an executable (GUI) linked with the PGPLOT library from C source file(s).
    pggwf2{CC}.bat a sample batch file to create an executable linked with the PGPLOT library from Fortran source file(s) using f2c with the {CC} compiler.

    c. Lib folder

    Library nameContents
    GrWin the main library of GrWin
    GrWin0 the same as GrWin except that this does not include Calcomp compatibles.
    calcomp Calcomp compatible library (requisite: GrWin0)
    pgplot PGPLOT library (requisite: GrWin)
    cpgplot PGPLOT library for C (requisite: pgplot + GrWin)
    f2c f2c library

    d. Include folder

    File nameContents
    GrWin.h a header file for the GrWin library
    cpgplot.h a header file for the PGPLOT library
    f2c.h a header file for the f2c library


  17. Download
  18. The official ftp site for the GrWin graphics library is

    ftp://spdg1.sci.shizuoka.ac.jp/pub/GrWinlib/english/.

    A mirror is available at ftp://ftp.esrf.fr/pub/scisoft/GrWinlib/english.
    [Thanks to Dr. Sanchez del Rio at the ESRF.]


    a. Installer packages for the GrWin graphics library

    To download a package file click an item in the first column of the table of the installer packages for GrWin below corresponding to your using compiler system referring the last column of the same table. The supported compiler systems can be seen at the Platforms section, and see the installation details in Install.

    Installer packages for GrWin
    File name Supported compiler system
    lGrWn0999be-MinGW.exe MinGW-2.0
    lGrWn0999be-cygwin.exe Cygnus Cygwin 1.3.x
    lGrWn0999be-watcom.exe Open Watcom C/C++ and Fortran 1.0
    lGrWn0999be-f2bcc.exe Borland C++ Compiler 5.5 + f2c
    lGrWn0999be-f2dmc.exe Digital Mars C/C++ Compilers + f2c
    lGrWn0999be-Intel.exe Intel(R) C++/Fortran Compiler 7.1 ( f2c available )
    lGrWn0999be-f2vcpp.exe Microsoft Visual C++ Version 6.0 + f2c
    lGrWn0999be-vf.exe Compaq Visual Fortran Version 6
    lGrWn0999be-mingw32m.exe gcc-2.95.2-mingw32
    lGrWn0999be-mingw32.exe gcc-2.95.2-mingw32
    lGrWn0999be-cygb20.exe gcc-2.95.2-cygb20
    lGrWn0999be-uwin.exe AT&T UWIN 3.x + gcc-2.95.2-uwin
    lGrWn0999be.exe All-in-one installer


    b. GrWin toolkit ( for VF users and developpers )

    GrWin toolkit is a set of source code fragments by which library files for the GrWin graphics library can be built under various compiler systems, and this includes also patches for PGPLOT and f2c as well as source code for PGPLOT Windows-drivers that enable you to use PGPLOT and f2c with GrWin.

    As PGPLOT drivers for Compaq Visual Fortran Version 6 are not included in the GrWin distributions, you should make yourself if necessary those drivers and library files for PGPLOT using this toolkit. You can make GrWin library files even for systems that has not yet been supported. This toolkit would be useful if you want to add new features or to modify specifications of the GrWin library for your own purposes. If you succeeded in porting GrWin to a system not listed in the table of supported compiler systems or in adding a new feature that seems useful for many users of GrWin, please let me know. Any donation of source code would be very appreciated.

    File name Contents
    GrWinTk-0999b.tgz the GrWin toolkit


    c. Other files

    Other files available for downloade are shown in the next table. Except the executables for PGPLOT demos, the uncompressed files and the files obtained by expanding each of the compressed files in the following table are the same as those installed in suitable folders executing an installer package in the above list. So there is almost no need to download files in the following table unless you need individual files for some reasons.

    All the files necessary to make PGPLOT applications under a supported compiler system are compressed by tar + gzip in pggw0999b-XXX.tgz with XXX the abbreviation for the system name. This includes also the executables, which are not installed by any installer, for the PGPLOT demos of the original distribution of PGPLOT, and with them you can estimate the ability of the PGPLOT drivers built with the GrWin library.

    Other files
    File name Contents
    README.html README file in HTML
    README.txt README file as plain text
    lGrWn0999b.html User's Manual in HTML
    lGrWn0999b.txt User's Manual as plain text
    lGrWn0999be.tgz All the files compressed by tar + gzip
    demoexe Sample executables of GrWin built under MinGW
    f2c-bcc.tgz f2c for Borland C++ Compiler 5.5
    f2c-dmc.tgz f2c for Digital Mars C/C++ Compilers
    f2c-Intel.tgz f2c for Intel(R) C++ Compiler 7.1
    f2c-vcpp.tgz f2c for Microsoft Visual C++ Version 6.0
    pggw-150.tgz Source code for PGPLOT Windows-drivers including patches to build PGPLOT library files on Windows.
    pggw0999b-MinGW.tgz PGPLOT files for MinGW-2.0
    pggw0999b-cygwin.tgz PGPLOT files for Cygnus Cygwin 1.3.x
    pggw0999b-watcom.tgz PGPLOT files for Open Watcom C/C++ and Fortran 1.0
    pggw0999b-f2bcc.tgz PGPLOT files for Borland C++ Compiler 5.5
    pggw0999b-f2dmc.tgz PGPLOT files for Digital Mars C/C++ Compilers
    pggw0999b-Intel.tgz PGPLOT files for Intel(R) C++/Fortran Compiler 7.1 ( f2c available )
    pggw0999b-f2vcpp.tgz PGPLOT files for Microsoft Visual C++ Version 6.0 + f2c
    pggw0999b-mingw32m.tgz PGPLOT files for gcc-2.95.2-mingw32
    pggw0999b-mingw32.tgz PGPLOT files for gcc-2.95.2-mingw32
    pggw0999b-cygb20.tgz PGPLOT files for gcc-2.95.2-cygb20
    pggw0999b-uwin.tgz PGPLOT files for AT&T UWIN 3.x + gcc-2.95.2-uwin
    libs library files for the supported compiler systems
    PREVIOUS/ the previous version

    Old files are available here. Please do not redistribute those older files.

  19. This version
  20. This is a beta release of the project of the GrWin Library. The specifications of the library routines described in the the user's manual are almost the same as of the future authorized first release 1.00.X, though bugs and wrong descriptions in documentation are still anticipated.

    This project is under developing, and some versions will be distributed after this. If different versions of files libGrWin.a, GrWin.h and grwnd.exe are used together the resultant executables do not work properly, in principle. When running an executable of your application created with the GrWin Library of a version different from that of grwnd.exe using, you see a warning message like

    WARNING: XXX [x,x,x,x] is older than YYY [y,y,y,y]

    where [x,x,x,x] and [y,y,y,y] show the versions of XXX and YYY, respectively. The version numbers of the library and the compatible grwnd.exe can be obtained also by calling GWVERSION in the library.

    The latest version is available at http://spdg1.sci.shizuoka.ac.jp/grwinlib/english/.

    Using a utility f77chk in the distribution, fortran source code can be checked if it is suited for the current version of the library.

    If you experienced problems please contact the author. The previous and older releases are available (please do not redistribute any of those older releases).

    The project itself is intended to be used for all of Windows Xp/2000/NT and Windows Me/9x platforms, but some features do not properly work on Windows Me/9x. So it is strongly recommended to use the software on Windows Xp/2000/NT4.

    grwnd.exe and vcpp/GrWin.lib were created by using Microsoft VC++ 6.0 (MFC for grwnd.exe). MinGW\libGrWin.a was created by using MinGW-2.0. mingw32\libGrWin.a and mingw32m\libGrWin.a were created by using gcc-2.95.2-mingw32. cygwin\libGrWin.a was created by using Cygnus Cygwin 1.3.x. cygb20\libGrWin.a was created by using Cygnus Cygwin B20.1 + gcc-2.95.2-cygb20. uwin\libGrWin.a was created by using AT&T UWIN 3.x + gcc-2.95.2-uwin. bcc\GrWin.lib was created by using Borland C++ Compiler 5.5. dmc\GrWin.lib was created by using Digital Mars C/C++ Compilers.

    The above mentioned files and associated documents are copyrighted by Tsuguhiro TAMARIBUCH, but available freely for any purposes. Users may redistribute the file lGrWn0999be.tgz to third parties for non-commercial purposes provided that no charge except necessary minimum costs in the distribution is made.

    This software is provided AS IS without warranty of any kind.


Created: Jul 21, 2003