From: <ai...@us...> - 2008-12-14 05:52:27
|
Revision: 9097 http://plplot.svn.sourceforge.net/plplot/?rev=9097&view=rev Author: airwin Date: 2008-12-14 05:52:23 +0000 (Sun, 14 Dec 2008) Log Message: ----------- Disable python gnome2 (ENABLE_pygcw=OFF) by default. Modified Paths: -------------- trunk/README.release trunk/cmake/modules/gcw.cmake Modified: trunk/README.release =================================================================== --- trunk/README.release 2008-12-14 05:41:05 UTC (rev 9096) +++ trunk/README.release 2008-12-14 05:52:23 UTC (rev 9097) @@ -29,7 +29,22 @@ specifically use the cmake options -DENABLE_tk=ON -DENABLE_itk=ON -DENABLE_itcl=ON to build and install these components. -III. This is official notice that we no longer support Octave-2.1.73 which +III. This is official notice that the python version of gnome2 has been +temporarily disabled by default until we can figure out a + +RuntimeError: maximum recursion depth exceeded + +error that has been introduced for it (e.g., when running +plplotcanvas_animation.py in the installed examples/python directory). If +you wish to experiment with this component of PLplot use the +-DENABLE_pygcw=ON option. + +examples/c/plplotcanvas_animation (when built in the install tree for the +default ENABLE_gnome2=ON case) works fine. So do all the standard examples +in the installed examples/python tree. So this issue appears to be confined +just to the python version of gnome2. + +IV. This is official notice that we no longer support Octave-2.1.73 which has a variety of run-time issues in our tests of the Octave examples on different platforms. In contrast our tests show we get good run-time results with all our Octave examples for Octave-3.0.1. Also, that is the @@ -37,7 +52,7 @@ http://www.gnu.org/software/octave/download.html so that is the only version of Octave we support at this time. -IV. This is official notice that the PLplot team have decided for +V. This is official notice that the PLplot team have decided for consistency sake to change the PLplot stream variables plsc->vpwxmi, plsc->vpwxma, plsc->vpwymi, and plsc->vpwyma and the results returned by plgvpw to reflect the exact window limit values input by users using plwind. Modified: trunk/cmake/modules/gcw.cmake =================================================================== --- trunk/cmake/modules/gcw.cmake 2008-12-14 05:41:05 UTC (rev 9096) +++ trunk/cmake/modules/gcw.cmake 2008-12-14 05:52:23 UTC (rev 9097) @@ -105,7 +105,7 @@ option(ENABLE_pygcw "Enable Python Gnome2 bindings" OFF) else(DEFAULT_NO_BINDINGS) option(ENABLE_gnome2 "Enable Gnome2 bindings" ON) - option(ENABLE_pygcw "Enable Python Gnome2 bindings" ON) + option(ENABLE_pygcw "Enable Python Gnome2 bindings" OFF) endif(DEFAULT_NO_BINDINGS) if(ENABLE_gnome2 AND NOT PLD_gcw) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-12-14 20:37:10
|
Revision: 9104 http://plplot.svn.sourceforge.net/plplot/?rev=9104&view=rev Author: smekal Date: 2008-12-14 20:37:02 +0000 (Sun, 14 Dec 2008) Log Message: ----------- Fixed the bug which caused wxPLplotDemo to segfault. Since there is no easy fix for this the AGG backend is disabled for the wxWidgets bindings, wxDC and wxGC backend still work. This was tested on Linux with wxWidgets 2.6.4 and 2.8.9. Another bug showed up, when the window of wxPLplotDemo was sized to a very small size. This bug was also fixed. Also the frame of wxPLplotDemo has a minimum size now. Set ENABLE_wxwidgets to ON again. Modified Paths: -------------- trunk/bindings/wxwidgets/wxPLplotstream.cpp trunk/cmake/modules/wxwidgets.cmake trunk/drivers/wxwidgets_dc.cpp trunk/examples/c++/wxPLplotDemo.cpp Modified: trunk/bindings/wxwidgets/wxPLplotstream.cpp =================================================================== --- trunk/bindings/wxwidgets/wxPLplotstream.cpp 2008-12-14 09:47:14 UTC (rev 9103) +++ trunk/bindings/wxwidgets/wxPLplotstream.cpp 2008-12-14 20:37:02 UTC (rev 9104) @@ -68,7 +68,7 @@ if( m_style & wxPLPLOT_BACKEND_GC ) backend=2; else if ( m_style & wxPLPLOT_BACKEND_AGG ) - backend=1; + backend=0; else backend=0; @@ -81,12 +81,12 @@ SetOpt( "-drvopt", drvopt ); init(); -#ifdef HAVE_AGG - m_image = new wxImage( m_width, m_height ); - cmd( PLESC_DEVINIT, (void*)m_image ); -#else +//#ifdef HAVE_AGG +// m_image = new wxImage( m_width, m_height ); +// cmd( PLESC_DEVINIT, (void*)m_image ); +//#else cmd( PLESC_DEVINIT, (void*)m_dc ); -#endif +//#endif } @@ -116,25 +116,25 @@ the other way round if the buffer size decreases. There is no impact for the other backends. This is kind of hacky, but I have no better idea in the moment */ - if( width*height>m_width*m_height ) { -#ifdef HAVE_AGG - if( m_image ) - delete m_image; - m_image = new wxImage( width, height ); - cmd( PLESC_DEVINIT, (void*)m_image ); -#endif + //~ if( width*height>m_width*m_height ) { +//~ #ifdef HAVE_AGG + //~ if( m_image ) + //~ delete m_image; + //~ m_image = new wxImage( width, height ); + //~ cmd( PLESC_DEVINIT, (void*)m_image ); +//~ #endif wxSize size( width, height ); cmd( PLESC_RESIZE, (void*)&size ); - } else { - wxSize size( width, height ); - cmd( PLESC_RESIZE, (void*)&size ); -#ifdef HAVE_AGG - if( m_image ) - delete m_image; - m_image = new wxImage( width, height ); - cmd( PLESC_DEVINIT, (void*)m_image ); -#endif - } + //~ } else { + //~ wxSize size( width, height ); + //~ cmd( PLESC_RESIZE, (void*)&size ); +//~ #ifdef HAVE_AGG + //~ if( m_image ) + //~ delete m_image; + //~ m_image = new wxImage( width, height ); + //~ cmd( PLESC_DEVINIT, (void*)m_image ); +//~ #endif + //~ } m_width=width; m_height=height; @@ -155,14 +155,14 @@ */ void wxPLplotstream::Update() { -#ifdef HAVE_AGG - if( m_style & wxPLPLOT_BACKEND_AGG ) { - wxMemoryDC MemoryDC; - wxBitmap bitmap( *m_image, -1 ); - MemoryDC.SelectObject( bitmap ); - m_dc->Blit( 0, 0, m_width, m_height, &MemoryDC, 0, 0 ); - MemoryDC.SelectObject( wxNullBitmap ); - } -#endif +//~ #ifdef HAVE_AGG + //~ if( m_style & wxPLPLOT_BACKEND_AGG ) { + //~ wxMemoryDC MemoryDC; + //~ wxBitmap bitmap( *m_image, -1 ); + //~ MemoryDC.SelectObject( bitmap ); + //~ m_dc->Blit( 0, 0, m_width, m_height, &MemoryDC, 0, 0 ); + //~ MemoryDC.SelectObject( wxNullBitmap ); + //~ } +//~ #endif } Modified: trunk/cmake/modules/wxwidgets.cmake =================================================================== --- trunk/cmake/modules/wxwidgets.cmake 2008-12-14 09:47:14 UTC (rev 9103) +++ trunk/cmake/modules/wxwidgets.cmake 2008-12-14 20:37:02 UTC (rev 9104) @@ -89,7 +89,7 @@ if(DEFAULT_NO_BINDINGS) option(ENABLE_wxwidgets "Enable wxwidgets bindings" OFF) else(DEFAULT_NO_BINDINGS) - option(ENABLE_wxwidgets "Enable wxwidgets bindings" OFF) + option(ENABLE_wxwidgets "Enable wxwidgets bindings" ON) endif(DEFAULT_NO_BINDINGS) if(ENABLE_wxwidgets AND NOT PLD_wxwidgets) Modified: trunk/drivers/wxwidgets_dc.cpp =================================================================== --- trunk/drivers/wxwidgets_dc.cpp 2008-12-14 09:47:14 UTC (rev 9103) +++ trunk/drivers/wxwidgets_dc.cpp 2008-12-14 20:37:02 UTC (rev 9104) @@ -346,8 +346,9 @@ if( m_font ) delete m_font; - m_font=wxFont::New((int) (fontSize*fontScale), fontFamilyLookup[fontFamily], - fontStyleLookup[fontStyle] & fontWeightLookup[fontWeight] ); + m_font=wxFont::New((int) (fontSize*fontScale<4 ? 4 : fontSize*fontScale), + fontFamilyLookup[fontFamily], + fontStyleLookup[fontStyle] & fontWeightLookup[fontWeight] ); m_font->SetUnderlined( underlined ); m_dc->SetFont( *m_font ); } Modified: trunk/examples/c++/wxPLplotDemo.cpp =================================================================== --- trunk/examples/c++/wxPLplotDemo.cpp 2008-12-14 09:47:14 UTC (rev 9103) +++ trunk/examples/c++/wxPLplotDemo.cpp 2008-12-14 20:37:02 UTC (rev 9104) @@ -169,7 +169,8 @@ box->Add( plotwindow, 1, wxALL | wxEXPAND, 0 ); panel->SetSizer( box ); - SetSize( 640, 500 ); // set wxWindow size + SetSize( 640, 500 ); // set frame size + SetSizeHints( 220, 150 ); // set minimum frame size Plot(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hba...@us...> - 2008-12-15 02:09:14
|
Revision: 9109 http://plplot.svn.sourceforge.net/plplot/?rev=9109&view=rev Author: hbabcock Date: 2008-12-15 02:06:53 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Updated in preparation for the next release. Modified Paths: -------------- trunk/OLD-README.release trunk/README.release Modified: trunk/OLD-README.release =================================================================== --- trunk/OLD-README.release 2008-12-15 01:49:26 UTC (rev 9108) +++ trunk/OLD-README.release 2008-12-15 02:06:53 UTC (rev 9109) @@ -1,3 +1,592 @@ +PLplot Release 5.9.1 +~~~~~~~~~~~~~~~~~~~~ +This is a development release of PLplot. It represents the ongoing efforts +of the community to improve the PLplot plotting package. Development +releases in the 5.9.x series will be available every few months. The next +stable release will be 5.10.0. + + If you encounter a problem that is not already documented in the +PROBLEMS file, then please send bug reports to PLplot developers via the +mailing lists at http://sourceforge.net/mail/?group_id=2915 . + + Please see the license under which this software is distributed +(LGPL), and the disclaimer of all warranties, given in the COPYING.LIB +file. + +Notices for Users. + +I. This is the official notice that our deprecated autotools-based build +system has now been removed. Instead, use the CMake-based build system +following the directions in the INSTALL file. + +II. This is official notice that the tk, itk, and itcl components of PLplot +have been disabled by default for this release. We reluctantly take this +step for these venerable PLplot components because we found segfaults with +most of our Tk-related interactive tests for this release. We hope these +issues are addressed before our next release so that the tk, itk, and itcl +components of PLplot can be enabled by default again. For now, if you want +to try these components of PLplot to help us debug the problem, you must +specifically use the cmake options -DENABLE_tk=ON -DENABLE_itk=ON +-DENABLE_itcl=ON to build and install these components. + +III. This is official notice that the python version of gnome2 has been +temporarily disabled by default until we can figure out a + +RuntimeError: maximum recursion depth exceeded + +error that has been introduced for it (e.g., when running +plplotcanvas_animation.py in the installed examples/python directory). If +you wish to experiment with this component of PLplot use the +-DENABLE_pygcw=ON option. + +examples/c/plplotcanvas_animation (when built in the install tree for the +default ENABLE_gnome2=ON case) works fine. So do all the standard examples +in the installed examples/python tree. So this issue appears to be confined +just to the python version of gnome2. + +IV. This is official notice that we no longer support Octave-2.1.73 which +has a variety of run-time issues in our tests of the Octave examples on +different platforms. In contrast our tests show we get good run-time +results with all our Octave examples for Octave-3.0.1. Also, that is the +recommended stable version of Octave at +http://www.gnu.org/software/octave/download.html so that is the only version +of Octave we support at this time. + +V. This is official notice that the PLplot team have decided for +consistency sake to change the PLplot stream variables plsc->vpwxmi, +plsc->vpwxma, plsc->vpwymi, and plsc->vpwyma and the results returned by +plgvpw to reflect the exact window limit values input by users using plwind. +Previously to this change, the stream variables and the values returned by +plgvpw reflected the internal slightly expanded range of window limits used +by PLplot so that the user's specified limits would be on the graph. Two +users noted this slight difference, and we agree with them it should not be +there. Note that internally, PLplot still uses the expanded ranges so most +users results will be identical. However, you may notice some small changes +to your plot results if you use these stream variables directly (only +possible in C/C++) or use plgvpw. + +INDEX + +1. Changes relative to PLplot 5.9.0 (the previous development release) +1.1 New PLplot functions +1.2 Improvements to the cairo driver family. +1.3 wxWidgets driver improvements +1.4 pdf driver improvements +1.5 svg driver improvements +1.6 Ada language support +1.7 OCaml language support +1.8 Perl/PDL language support +1.9 Update to various language bindings +1.10 Update to various examples +1.11 Rename test subdirectory to plplot_test +1.12 Website support files updated +1.13 Internal changes to function visibility +1.14 Dynamic driver support in Windows +1.15 Documentation updates + +2. Changes relative to PLplot 5.8.0 (the previous stable release) +2.1 All autotools-related files have now been removed +2.2 Build system bug fixes +2.3 Build system improvements +2.4 Implement build-system infrastructure for installed Ada bindings and +examples +2.5 Code cleanup +2.6 Date / time labels for axes +2.7 Alpha value support +2.8 New PLplot functions +2.9 External libLASi library improvements affecting our psttf device. +2.10 Improvements to the cairo driver family. +2.11 wxWidgets driver improvements +2.12 pdf driver improvements +2.13 svg driver improvements +2.14 Ada language support +2.15 OCaml language support +2.16 Perl/PDL language support +2.17 Update to various language bindings +2.18 Update to various examples +2.19 Rename test subdirectory to plplot_test +2.20 Website support files updated +2.21 Internal changes to function visibility +2.22 Dynamic driver support in Windows +2.23 Documentation updates + +1. Changes relative to PLplot 5.9.0 (the previous development release) + +1.1 New PLplot functions + +An enhanced version of plimage, plimagefr has been added. This allows images +to be plotted using coordinate transformation, and also for the dynamic range +of the plotted values to be altered. Example 20 has been modified to +demonstrate this new functionality. + +To ensure consistent results in example 21 between different platforms and +language bindings PLplot now includes a small random number generator (based +on the original Mersenne Twister 1997 code) within the library. plrandd will +return a PLFLT random number in the range 0.0-1.0. plseed will allow the +random number generator to be seeded. + +1.2 Improvements to the cairo driver family. + +Jonathan Woithe improved the xcairo driver so that it can optionally be +used with an external user supplied X Drawable. This enables a nice +separation of graphing (PLplot) and window management (Gtk, etc..). Doug +Hunt fixed the bugs that broke the memcairo driver and it is now fully +functional. Additionally, a new extcairo driver was added that will plot +into a user supplied cairo context. + +1.3 wxWidgets driver improvements + +Complete reorganization of the driver code. A new backend was added, based +on the wxGraphicsContext class, which is available for wxWidgets 2.8.4 +and later. This backend produces antialized output similar to the +AGG backend but has no dependency on the AGG library. The basic wxDC +backend and the wxGraphicsContext backend process the text output +on their own, which results in much nicer plots than with the standard +Hershey fonts and is much faster than using the freetype library. New +options were introduced in the wxWidgets driver: + - backend: Choose backend: (0) standard, (1) using AGG library, + (2) using wxGraphicsContext + - hrshsym: Use Hershey symbol set (hrshsym=0|1) + - text: Use own text routines (text=0|1) + - freetype: Use FreeType library (freetype=0|1) +The option "text" changed its meaning, since it enabled the FreeType library +support, while now the option enables the driver's own text routines. + +Some other features were added: + * the wxWidgets driver now correctly clears the background (or parts of it) + * transparency support was added + * the "locate mode" (already availale in the xwin and tk driver) was + implemented, where graphics input events are processed and translated + to world coordinates + +1.4 pdf driver improvements + +The pdf driver (which is based on the haru library http://www.libharu.org) +processes the text output now on its own. So far only the Adobe Type1 +fonts are supported. TrueType font support will follow. Full unicode +support will follow after the haru library will support unicode strings. The +driver is now able to produce A4, letter, A5 and A3 pages. The Hershey font +may be used only for symbols. Output can now be compressed, resulting in +much smaller file sizes. +Added new options: + - text: Use own text routines (text=0|1) + - compress: Compress pdf output (compress=0|1) + - hrshsym: Use Hershey symbol set (hrshsym=0|1) + - pagesize: Set page size (pagesize=A4|letter|A3|A5) + +1.5 svg driver improvements + +This device driver has had the following improvements: schema for generated +file now validates properly at http://validator.w3.org/ for the +automatically detected document type of SVG 1.1; -geometry option now works; +alpha channel transparency has been implemented; file familying for +multipage examples has been implemented; coordinate scaling has been +implemented so that full internal PLplot resolution is used; extraneous +whitespace and line endings that were being injected into text in error have +now been removed; and differential correction to string justification is now +applied. + +The result of these improvements is that our SVG device now gives the +best-looking results of all our devices. However, currently you must be +careful of which SVG viewer or editor you try because a number of them have +some bugs that need to be resolved. For example, there is a librsvg bug in +text placement (http://bugzilla.gnome.org/show_bug.cgi?id=525023) that +affects all svg use within GNOME as well as the ImageMagick "display" +application. However, at least the latest konqueror and firefox as well as +inkscape and scribus-ng (but not scribus!) give outstanding looking results +for files generated by our svg device driver. + +1.6 Ada language support + +We now have a complete Ada bindings implemented for PLplot. We also have a +complete set of our standard examples implemented in Ada which give results +that are identical with corresponding results for the C standard examples. +This is an excellent test of a large subset of the Ada bindings. We now +enable Ada by default for our users and request widespread testing of this +new feature. + +1.7 OCaml language support + +Thanks primarily to Hezekiah M. Carty's efforts we now have a complete OCaml +bindings implemented for PLplot. We also have a complete set of our standard +examples implemented in OCaml which give results that are identical with +corresponding results for the C standard examples. This is an excellent test +of a large subset of the OCaml bindings. We now enable OCaml by default for +our users and request widespread testing of this new feature. + +1.8 Perl/PDL language support + +Thanks to Doug Hunt's efforts the external Perl/PDL module, +PDL::Graphics::PLplot version 0.46 available at +http://search.cpan.org/dist/PDL-Graphics-PLplot has been brought up to date +to give access to recently added PLplot API. The instructions for how to +install this module on top of an offical PDL release are given in +examples/perl/README.perldemos. Doug has also finished implementing a +complete set of standard examples in Perl/PDL which are part of PLplot and +which produce identical results to their C counterparts if the above updated +module has been installed. Our build system tests the version of +PDL::Graphics::PLplot that is available, and if it is not 0.46 or later, the +list of Perl/PDL examples that are run as part of our standard tests is +substantially reduced to avoid examples that use the new functionality. In +sum, if you use PDL::Graphics::PLplot version 0.46 or later the full +complement of PLplot commands is available to you from Perl/PDL, but +otherwise not. + +1.9 Updates to various language bindings + +A concerted effort has been made to bring all the language bindings up to +date with recently added functions. Ada, C++, f77, f95, Java, OCaml, Octave, +Perl/PDL, Python, and Tcl now all support the common PLplot API (with the +exception of the mapping functions which are not yet implemented for all +bindings due to technical issues.) This is a significant step forward for +those using languages other than C. + +1.10 Updates to various examples + +To help test the updates to the language bindings the examples have been +thoroughly checked. Ada, C, C++, f77, f95, and OCaml now contain a full set +of non-interactive tests (example 1-30 excluding 14 and 17). Java, Octave, +Python and Tcl are missing example 19 because of the issue with the mapping +functions. The examples have also been checked to ensure consistent results +between different language bindings. Currently there are still some minor +differences in the results for the tcl examples, probably due to rounding +errors. The standard test suite for PLplot using ctest now carries out a +comparison of the postscript output for different languages as a check. Some +of the Tcl examples (example 21) require Tcl version 8.5 for proper support +for NaNs. + +Also new is an option for the plplot_test.sh script to run the examples +using a debugging command. This is enabled using the --debug option. The +default it to use the valgrind memory checker. This has highlighted at +least one memory leaks in plplot which have been fixed. It is not part +of the standard ctest tests because it can be _very_ slow for a complete +set of language bindings and device drivers. + +1.11 Rename test subdirectory to plplot_test + +This change was necessary to quit clashing with the "make test" target which +now works for the first time ever (by executing ctest). + +1.12 Website support files updated + +Our new website content is generated with PHP and uses CSS (cascaded style +sheets) to implement a consistent style. This new approach demanded lots of +changes in the website support files that are used to generate and upload +our website and which are automatically included with the release. + +1.13 Internal changes to function visibility + +The internal definitions of functions in plplot have been significantly +tidied up to allow the use of the -fvisibility=hidden option with newer +versions of gcc. This prevents internal functions from being exported +to the user where possible. This extends the existing support for this +on windows. + +1.14 Dynamic driver support in Windows + +An interface based on the ltdl library function calls was established +which allows to open and close dynamic link libraries (DLL) during +run-time and call functions from these libraries. As a consequence +drivers can now be compiled into single DLLs separate from the core +plplot DLL also in Windows. The cmake option ENABLE_DYNDRIVERS is now +ON by default for Windows if a shared plplot library is built. + +1.15 Documentation updates + +The docbook documentation has been updated to include many of the +C-specific functions (for example plAlloc2dGrid) which are not part +of the common API, but are used in the examples and may be helpful +for plplot users. + +2. Changes relative to PLplot 5.8.0 (the previous stable release) + +2.1 All autotools-related files have now been removed + +CMake (with the exception of a special build script for the DJGPP platform) +is now the only supported build system. It has been tested on Linux / Unix, +Mac OS-X and Windows platforms. + +2.2 Build system bug fixes + +Various fixes include the following: + +Ctest will now work correctly when the build tree path includes symlinks. + +Dependencies for swig generated files fixed so they are not rebuilt every +time make is called. + +Various dependency fixes to ensure that parallel builds (using make -j) +work under unix. + +2.3 Build system improvements + +We now transform link flag results delivered to the CMake environment by +pkg-config into the preferred CMake form of library information. The +practical effect of this improvement is that external libraries in +non-standard locations now have their rpath options set correctly for our +build system both for the build tree and the install tree so you don't have +to fiddle with LD_LIBRARY_PATH, etc. + +2.4 Implement build-system infrastructure for installed Ada bindings and +examples + +Install source files, library information files, and the plplotada library +associated with the Ada bindings. Configure and install the pkg-config file +for the plplotada library. Install the Ada examples and a configured Makefile +to build them in the install tree. + +2.5 Code cleanup + +The PLplot source code has been cleaned up to make consistent use of +(const char *) and (char *) throughout. Some API functions have changed +to use const char * instead of char * to make it clear that the strings +are not modified by the function. The C and C++ examples have been updated +consistent with this. These changes fix a large number of warnings +with gcc-4.2. Note: this should not require programs using PLplot to be +recompiled as it is not a binary API change. + +There has also been some cleanup of include files in the C++ examples +so the code will compile with the forthcoming gcc-4.3. + +2.6 Date / time labels for axes + +PLplot now allows date / time labels to be used on axes. A new option +('d') is available for the xopt and yopt arguments to plbox which +indicates that the axis should be interpreted as a date / time. Similarly +there is a new range of options for plenv to select date / time labels. +The time format is seconds since the epoch (usually 1 Jan 1970). This +format is commonly used on most systems. The C gmtime routine can be +used to calculate this for a given date and time. The format for the +labels is controlled using a new pltimefmt function, which takes a +format string. All formatting is done using the C strftime function. +See documentation for available options on your platform. Example 29 +demonstrates the new capabilities. + +N.B. Our reliance on C library POSIX time routines to (1) convert from +broken-down time to time-epoch, (2) to convert from time-epoch to +broken-down time, and (3) to format results with strftime have proved +problematic for non-C languages which have time routines of variable +quality. Also, it is not clear that even the POSIX time routines are +available on Windows. So we have plans afoot to implement high-quality +versions of (1), (2), and (3) with additional functions to get/set the epoch +in the PLplot core library itself. These routines should work on all C +platforms and should also be uniformly accessible for all our language +bindings. + +WARNING..... Therefore, assuming these plans are implemented, the present +part of our date/time PLplot API that uses POSIX time routines will be +changed. + +2.7 Alpha value support + +PLplot core has been modified to support a transparency or alpha value +channel for each color in color map 0 and 1. In addition a number of new +functions were added the PLplot API so that the user can both set and query +alpha values for color in the two color maps. These functions have the same +name as their non-alpha value equivalents, but with a an "a" added to the +end. Example 30 demonstrates some different ways to use these functions +and the effects of alpha values, at least for those drivers that support alpha +values. This change should have no effect on the device drivers that do not +currently support alpha values. Currently only the cairo, gd, wxwidgets and +aquaterm drivers support alpha values. There are some limitations with the gd +driver due to transparency support in the underlying libgd library. + +2.8 New PLplot functions + +An enhanced version of plimage, plimagefr has been added. This allows images +to be plotted using coordinate transformation, and also for the dynamic range +of the plotted values to be altered. Example 20 has been modified to +demonstrate this new functionality. + +To ensure consistent results in example 21 between different platforms and +language bindings PLplot now includes a small random number generator within +the library. plrandd will return a PLFLT random number in the range 0.0-1.0. +plseed will allow the random number generator to be seeded. + +2.9 External libLASi library improvements affecting our psttf device. + +Our psttf device depends on the libLASi library. libLASi-1.1.0 has just been +released at http://sourceforge.net/svn/?group_id=187113 . We recommend +using this latest version of libLASi for building PLplot and the psttf +device since this version of libLASi is more robust against glyph +information returned by pango/cairo/fontconfig that on rare occasions is not +suitable for use by libLASi. + +2.10 Improvements to the cairo driver family. + +Jonathan Woithe improved the xcairo driver so that it can optionally be +used with an external user supplied X Drawable. This enables a nice +separation of graphing (PLplot) and window management (Gtk, etc..). Doug +Hunt fixed the bugs that broke the memcairo driver and it is now fully +functional. Additionally, a new extcairo driver was added that will plot +into a user supplied cairo context. + +2.11 wxWidgets driver improvements + +Complete reorganization of the driver code. A new backend was added, based +on the wxGraphicsContext class, which is available for wxWidgets 2.8.4 +and later. This backend produces antialized output similar to the +AGG backend but has no dependency on the AGG library. The basic wxDC +backend and the wxGraphicsContext backend process the text output +on their own, which results in much nicer plots than with the standard +Hershey fonts and is much faster than using the freetype library. New +options were introduced in the wxWidgets driver: + - backend: Choose backend: (0) standard, (1) using AGG library, + (2) using wxGraphicsContext + - hrshsym: Use Hershey symbol set (hrshsym=0|1) + - text: Use own text routines (text=0|1) + - freetype: Use FreeType library (freetype=0|1) +The option "text" changed its meaning, since it enabled the FreeType library +support, while now the option enables the driver's own text routines. + +Some other features were added: + * the wxWidgets driver now correctly clears the background (or parts of it) + * transparency support was added + * the "locate mode" (already availale in the xwin and tk driver) was + implemented, where graphics input events are processed and translated + to world coordinates + +2.12 pdf driver improvements + +The pdf driver (which is based on the haru library http://www.libharu.org) +processes the text output now on its own. So far only the Adobe Type1 +fonts are supported. TrueType font support will follow. Full unicode +support will follow after the haru library will support unicode strings. The +driver is now able to produce A4, letter, A5 and A3 pages. The Hershey font +may be used only for symbols. Output can now be compressed, resulting in +much smaller file sizes. +Added new options: + - text: Use own text routines (text=0|1) + - compress: Compress pdf output (compress=0|1) + - hrshsym: Use Hershey symbol set (hrshsym=0|1) + - pagesize: Set page size (pagesize=A4|letter|A3|A5) + +2.13 svg driver improvements + +This device driver has had the following improvements: schema for generated +file now validates properly at http://validator.w3.org/ for the +automatically detected document type of SVG 1.1; -geometry option now works; +alpha channel transparency has been implemented; file familying for +multipage examples has been implemented; coordinate scaling has been +implemented so that full internal PLplot resolution is used; extraneous +whitespace and line endings that were being injected into text in error have +now been removed; and differential correction to string justification is now +applied. + +The result of these improvements is that our SVG device now gives the +best-looking results of all our devices. However, currently you must be +careful of which SVG viewer or editor you try because a number of them have +some bugs that need to be resolved. For example, there is a librsvg bug in +text placement (http://bugzilla.gnome.org/show_bug.cgi?id=525023) that +affects all svg use within GNOME as well as the ImageMagick "display" +application. However, at least the latest konqueror and firefox as well as +inkscape and scribus-ng (but not scribus!) give outstanding looking results +for files generated by our svg device driver. + +2.14 Ada language support + +We now have a complete Ada bindings implemented for PLplot. We also have a +complete set of our standard examples implemented in Ada which give results +that are identical with corresponding results for the C standard examples. +This is an excellent test of a large subset of the Ada bindings. We now +enable Ada by default for our users and request widespread testing of this +new feature. + +2.15 OCaml language support + +Thanks primarily to Hezekiah M. Carty's efforts we now have a complete OCaml +bindings implemented for PLplot. We also have a complete set of our standard +examples implemented in OCaml which give results that are identical with +corresponding results for the C standard examples. This is an excellent test +of a large subset of the OCaml bindings. We now enable OCaml by default for +our users and request widespread testing of this new feature. + +2.16 Perl/PDL language support + +Thanks to Doug Hunt's efforts the external Perl/PDL module, +PDL::Graphics::PLplot version 0.46 available at +http://search.cpan.org/dist/PDL-Graphics-PLplot has been brought up to date +to give access to recently added PLplot API. The instructions for how to +install this module on top of an offical PDL release are given in +examples/perl/README.perldemos. Doug has also finished implementing a +complete set of standard examples in Perl/PDL which are part of PLplot and +which produce identical results to their C counterparts if the above updated +module has been installed. Our build system tests the version of +PDL::Graphics::PLplot that is available, and if it is not 0.46 or later, the +list of Perl/PDL examples that are run as part of our standard tests is +substantially reduced to avoid examples that use the new functionality. In +sum, if you use PDL::Graphics::PLplot version 0.46 or later the full +complement of PLplot commands is available to you from Perl/PDL, but +otherwise not. + +2.17 Updates to various language bindings + +A concerted effort has been made to bring all the language bindings up to +date with recently added functions. Ada, C++, f77, f95, Java, OCaml, Octave, +Perl/PDL, Python, and Tcl now all support the common PLplot API (with the +exception of the mapping functions which are not yet implemented for all +bindings due to technical issues.) This is a significant step forward for +those using languages other than C. + +2.18 Updates to various examples + +To help test the updates to the language bindings the examples have been +thoroughly checked. Ada, C, C++, f77, f95, and OCaml now contain a full set +of non-interactive tests (example 1-30 excluding 14 and 17). Java, Octave, +Python and Tcl are missing example 19 because of the issue with the mapping +functions. The examples have also been checked to ensure consistent results +between different language bindings. Currently there are still some minor +differences in the results for the tcl examples, probably due to rounding +errors. The standard test suite for PLplot using ctest now carries out a +comparison of the postscript output for different languages as a check. Some +of the Tcl examples (example 21) require Tcl version 8.5 for proper support +for NaNs. + +Also new is an option for the plplot_test.sh script to run the examples +using a debugging command. This is enabled using the --debug option. The +default it to use the valgrind memory checker. This has highlighted at +least one memory leaks in plplot which have been fixed. It is not part +of the standard ctest tests because it can be _very_ slow for a complete +set of language bindings and device drivers. + +2.19 Rename test subdirectory to plplot_test + +This change was necessary to quit clashing with the "make test" target which +now works for the first time ever (by executing ctest). + +2.20 Website support files updated + +Our new website content is generated with PHP and uses CSS (cascaded style +sheets) to implement a consistent style. This new approach demanded lots of +changes in the website support files that are used to generate and upload +our website and which are automatically included with the release. + +2.21 Internal changes to function visibility + +The internal definitions of functions in plplot have been significantly +tidied up to allow the use of the -fvisibility=hidden option with newer +versions of gcc. This prevents internal functions from being exported +to the user where possible. This extends the existing support for this +on windows. + +2.22 Dynamic driver support in Windows + +An interface based on the ltdl library function calls was established +which allows to open and close dynamic link libraries (DLL) during +run-time and call functions from these libraries. As a consequence +drivers can now be compiled into single DLLs separate from the core +plplot DLL also in Windows. The cmake option ENABLE_DYNDRIVERS is now +ON by default for Windows if a shared plplot library is built. + +2.23 Documentation updates + +The docbook documentation has been updated to include many of the +C-specific functions (for example plAlloc2dGrid) which are not part +of the common API, but are used in the examples and may be helpful +for plplot users. + + + PLplot Release 5.9.0 ~~~~~~~~~~~~~~~~~~~~ This is a development release of PLplot. It represents the ongoing efforts Modified: trunk/README.release =================================================================== --- trunk/README.release 2008-12-15 01:49:26 UTC (rev 9108) +++ trunk/README.release 2008-12-15 02:06:53 UTC (rev 9109) @@ -1,4 +1,4 @@ -PLplot Release 5.9.1 +PLplot Release 5.9.2 ~~~~~~~~~~~~~~~~~~~~ This is a development release of PLplot. It represents the ongoing efforts of the community to improve the PLplot plotting package. Development @@ -13,76 +13,10 @@ (LGPL), and the disclaimer of all warranties, given in the COPYING.LIB file. -Notices for Users. -I. This is the official notice that our deprecated autotools-based build -system has now been removed. Instead, use the CMake-based build system -following the directions in the INSTALL file. - -II. This is official notice that the tk, itk, and itcl components of PLplot -have been disabled by default for this release. We reluctantly take this -step for these venerable PLplot components because we found segfaults with -most of our Tk-related interactive tests for this release. We hope these -issues are addressed before our next release so that the tk, itk, and itcl -components of PLplot can be enabled by default again. For now, if you want -to try these components of PLplot to help us debug the problem, you must -specifically use the cmake options -DENABLE_tk=ON -DENABLE_itk=ON --DENABLE_itcl=ON to build and install these components. - -III. This is official notice that the python version of gnome2 has been -temporarily disabled by default until we can figure out a - -RuntimeError: maximum recursion depth exceeded - -error that has been introduced for it (e.g., when running -plplotcanvas_animation.py in the installed examples/python directory). If -you wish to experiment with this component of PLplot use the --DENABLE_pygcw=ON option. - -examples/c/plplotcanvas_animation (when built in the install tree for the -default ENABLE_gnome2=ON case) works fine. So do all the standard examples -in the installed examples/python tree. So this issue appears to be confined -just to the python version of gnome2. - -IV. This is official notice that we no longer support Octave-2.1.73 which -has a variety of run-time issues in our tests of the Octave examples on -different platforms. In contrast our tests show we get good run-time -results with all our Octave examples for Octave-3.0.1. Also, that is the -recommended stable version of Octave at -http://www.gnu.org/software/octave/download.html so that is the only version -of Octave we support at this time. - -V. This is official notice that the PLplot team have decided for -consistency sake to change the PLplot stream variables plsc->vpwxmi, -plsc->vpwxma, plsc->vpwymi, and plsc->vpwyma and the results returned by -plgvpw to reflect the exact window limit values input by users using plwind. -Previously to this change, the stream variables and the values returned by -plgvpw reflected the internal slightly expanded range of window limits used -by PLplot so that the user's specified limits would be on the graph. Two -users noted this slight difference, and we agree with them it should not be -there. Note that internally, PLplot still uses the expanded ranges so most -users results will be identical. However, you may notice some small changes -to your plot results if you use these stream variables directly (only -possible in C/C++) or use plgvpw. - INDEX -1. Changes relative to PLplot 5.9.0 (the previous development release) -1.1 New PLplot functions -1.2 Improvements to the cairo driver family. -1.3 wxWidgets driver improvements -1.4 pdf driver improvements -1.5 svg driver improvements -1.6 Ada language support -1.7 OCaml language support -1.8 Perl/PDL language support -1.9 Update to various language bindings -1.10 Update to various examples -1.11 Rename test subdirectory to plplot_test -1.12 Website support files updated -1.13 Internal changes to function visibility -1.14 Dynamic driver support in Windows -1.15 Documentation updates +1. Changes relative to PLplot 5.9.1 (the previous development release) 2. Changes relative to PLplot 5.8.0 (the previous stable release) 2.1 All autotools-related files have now been removed @@ -110,194 +44,10 @@ 2.22 Dynamic driver support in Windows 2.23 Documentation updates -1. Changes relative to PLplot 5.9.0 (the previous development release) -1.1 New PLplot functions +1. Changes relative to PLplot 5.9.1 (the previous development release) -An enhanced version of plimage, plimagefr has been added. This allows images -to be plotted using coordinate transformation, and also for the dynamic range -of the plotted values to be altered. Example 20 has been modified to -demonstrate this new functionality. -To ensure consistent results in example 21 between different platforms and -language bindings PLplot now includes a small random number generator (based -on the original Mersenne Twister 1997 code) within the library. plrandd will -return a PLFLT random number in the range 0.0-1.0. plseed will allow the -random number generator to be seeded. - -1.2 Improvements to the cairo driver family. - -Jonathan Woithe improved the xcairo driver so that it can optionally be -used with an external user supplied X Drawable. This enables a nice -separation of graphing (PLplot) and window management (Gtk, etc..). Doug -Hunt fixed the bugs that broke the memcairo driver and it is now fully -functional. Additionally, a new extcairo driver was added that will plot -into a user supplied cairo context. - -1.3 wxWidgets driver improvements - -Complete reorganization of the driver code. A new backend was added, based -on the wxGraphicsContext class, which is available for wxWidgets 2.8.4 -and later. This backend produces antialized output similar to the -AGG backend but has no dependency on the AGG library. The basic wxDC -backend and the wxGraphicsContext backend process the text output -on their own, which results in much nicer plots than with the standard -Hershey fonts and is much faster than using the freetype library. New -options were introduced in the wxWidgets driver: - - backend: Choose backend: (0) standard, (1) using AGG library, - (2) using wxGraphicsContext - - hrshsym: Use Hershey symbol set (hrshsym=0|1) - - text: Use own text routines (text=0|1) - - freetype: Use FreeType library (freetype=0|1) -The option "text" changed its meaning, since it enabled the FreeType library -support, while now the option enables the driver's own text routines. - -Some other features were added: - * the wxWidgets driver now correctly clears the background (or parts of it) - * transparency support was added - * the "locate mode" (already availale in the xwin and tk driver) was - implemented, where graphics input events are processed and translated - to world coordinates - -1.4 pdf driver improvements - -The pdf driver (which is based on the haru library http://www.libharu.org) -processes the text output now on its own. So far only the Adobe Type1 -fonts are supported. TrueType font support will follow. Full unicode -support will follow after the haru library will support unicode strings. The -driver is now able to produce A4, letter, A5 and A3 pages. The Hershey font -may be used only for symbols. Output can now be compressed, resulting in -much smaller file sizes. -Added new options: - - text: Use own text routines (text=0|1) - - compress: Compress pdf output (compress=0|1) - - hrshsym: Use Hershey symbol set (hrshsym=0|1) - - pagesize: Set page size (pagesize=A4|letter|A3|A5) - -1.5 svg driver improvements - -This device driver has had the following improvements: schema for generated -file now validates properly at http://validator.w3.org/ for the -automatically detected document type of SVG 1.1; -geometry option now works; -alpha channel transparency has been implemented; file familying for -multipage examples has been implemented; coordinate scaling has been -implemented so that full internal PLplot resolution is used; extraneous -whitespace and line endings that were being injected into text in error have -now been removed; and differential correction to string justification is now -applied. - -The result of these improvements is that our SVG device now gives the -best-looking results of all our devices. However, currently you must be -careful of which SVG viewer or editor you try because a number of them have -some bugs that need to be resolved. For example, there is a librsvg bug in -text placement (http://bugzilla.gnome.org/show_bug.cgi?id=525023) that -affects all svg use within GNOME as well as the ImageMagick "display" -application. However, at least the latest konqueror and firefox as well as -inkscape and scribus-ng (but not scribus!) give outstanding looking results -for files generated by our svg device driver. - -1.6 Ada language support - -We now have a complete Ada bindings implemented for PLplot. We also have a -complete set of our standard examples implemented in Ada which give results -that are identical with corresponding results for the C standard examples. -This is an excellent test of a large subset of the Ada bindings. We now -enable Ada by default for our users and request widespread testing of this -new feature. - -1.7 OCaml language support - -Thanks primarily to Hezekiah M. Carty's efforts we now have a complete OCaml -bindings implemented for PLplot. We also have a complete set of our standard -examples implemented in OCaml which give results that are identical with -corresponding results for the C standard examples. This is an excellent test -of a large subset of the OCaml bindings. We now enable OCaml by default for -our users and request widespread testing of this new feature. - -1.8 Perl/PDL language support - -Thanks to Doug Hunt's efforts the external Perl/PDL module, -PDL::Graphics::PLplot version 0.46 available at -http://search.cpan.org/dist/PDL-Graphics-PLplot has been brought up to date -to give access to recently added PLplot API. The instructions for how to -install this module on top of an offical PDL release are given in -examples/perl/README.perldemos. Doug has also finished implementing a -complete set of standard examples in Perl/PDL which are part of PLplot and -which produce identical results to their C counterparts if the above updated -module has been installed. Our build system tests the version of -PDL::Graphics::PLplot that is available, and if it is not 0.46 or later, the -list of Perl/PDL examples that are run as part of our standard tests is -substantially reduced to avoid examples that use the new functionality. In -sum, if you use PDL::Graphics::PLplot version 0.46 or later the full -complement of PLplot commands is available to you from Perl/PDL, but -otherwise not. - -1.9 Updates to various language bindings - -A concerted effort has been made to bring all the language bindings up to -date with recently added functions. Ada, C++, f77, f95, Java, OCaml, Octave, -Perl/PDL, Python, and Tcl now all support the common PLplot API (with the -exception of the mapping functions which are not yet implemented for all -bindings due to technical issues.) This is a significant step forward for -those using languages other than C. - -1.10 Updates to various examples - -To help test the updates to the language bindings the examples have been -thoroughly checked. Ada, C, C++, f77, f95, and OCaml now contain a full set -of non-interactive tests (example 1-30 excluding 14 and 17). Java, Octave, -Python and Tcl are missing example 19 because of the issue with the mapping -functions. The examples have also been checked to ensure consistent results -between different language bindings. Currently there are still some minor -differences in the results for the tcl examples, probably due to rounding -errors. The standard test suite for PLplot using ctest now carries out a -comparison of the postscript output for different languages as a check. Some -of the Tcl examples (example 21) require Tcl version 8.5 for proper support -for NaNs. - -Also new is an option for the plplot_test.sh script to run the examples -using a debugging command. This is enabled using the --debug option. The -default it to use the valgrind memory checker. This has highlighted at -least one memory leaks in plplot which have been fixed. It is not part -of the standard ctest tests because it can be _very_ slow for a complete -set of language bindings and device drivers. - -1.11 Rename test subdirectory to plplot_test - -This change was necessary to quit clashing with the "make test" target which -now works for the first time ever (by executing ctest). - -1.12 Website support files updated - -Our new website content is generated with PHP and uses CSS (cascaded style -sheets) to implement a consistent style. This new approach demanded lots of -changes in the website support files that are used to generate and upload -our website and which are automatically included with the release. - -1.13 Internal changes to function visibility - -The internal definitions of functions in plplot have been significantly -tidied up to allow the use of the -fvisibility=hidden option with newer -versions of gcc. This prevents internal functions from being exported -to the user where possible. This extends the existing support for this -on windows. - -1.14 Dynamic driver support in Windows - -An interface based on the ltdl library function calls was established -which allows to open and close dynamic link libraries (DLL) during -run-time and call functions from these libraries. As a consequence -drivers can now be compiled into single DLLs separate from the core -plplot DLL also in Windows. The cmake option ENABLE_DYNDRIVERS is now -ON by default for Windows if a shared plplot library is built. - -1.15 Documentation updates - -The docbook documentation has been updated to include many of the -C-specific functions (for example plAlloc2dGrid) which are not part -of the common API, but are used in the examples and may be helpful -for plplot users. - 2. Changes relative to PLplot 5.8.0 (the previous stable release) 2.1 All autotools-related files have now been removed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-15 12:45:27
|
Revision: 9117 http://plplot.svn.sourceforge.net/plplot/?rev=9117&view=rev Author: andrewross Date: 2008-12-15 12:45:13 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Update examples 9, 15 and 29 to include examples of using the following common API functions : pl_setcontlabelformat, plpat, plsmaj, plsmin, plerrx, plerry, plprec, plssym. This has already shown up one bug in plerrx and plerry. Currently only C versions have been updated. Modified Paths: -------------- trunk/doc/docbook/src/api.xml trunk/examples/c/x09c.c trunk/examples/c/x15c.c trunk/examples/c/x29c.c Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2008-12-15 12:40:45 UTC (rev 9116) +++ trunk/doc/docbook/src/api.xml 2008-12-15 12:45:13 UTC (rev 9117) @@ -201,7 +201,7 @@ </para> <para> - This function is not used in any examples. + This function is used example 9. </para> </sect1> @@ -2779,7 +2779,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> @@ -2886,7 +2886,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> @@ -7743,7 +7743,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 15. </para> </sect1> @@ -8140,7 +8140,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> @@ -11839,7 +11839,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> @@ -11976,7 +11976,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> @@ -12344,7 +12344,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> Modified: trunk/examples/c/x09c.c =================================================================== --- trunk/examples/c/x09c.c 2008-12-15 12:40:45 UTC (rev 9116) +++ trunk/examples/c/x09c.c 2008-12-15 12:45:13 UTC (rev 9117) @@ -346,6 +346,7 @@ plcol0(1); pllab("X Coordinate", "Y Coordinate", "Streamlines of flow"); */ + pl_setcontlabelformat(4,3); pl_setcontlabelparam(0.006, 0.3, 0.1, 1); plenv(-1.0, 1.0, -1.0, 1.0, 0, 0); plcol0(2); Modified: trunk/examples/c/x15c.c =================================================================== --- trunk/examples/c/x15c.c 2008-12-15 12:40:45 UTC (rev 9116) +++ trunk/examples/c/x15c.c 2008-12-15 12:45:13 UTC (rev 9117) @@ -22,6 +22,14 @@ static void cmap1_init1 (void); static void cmap1_init2 (void); +static PLINT nlin[10] = {1, 1, 1, 1, 1, 2, 2, 2, 2, 2}; +static PLINT inc[10][2] = { {450, 0}, {-450, 0}, {0, 0}, {900, 0}, {300, 0}, + {450,-450}, {0, 900}, {0, 450}, {450, -450}, {0, 900} }; +static PLINT del[10][2] = { {2000, 2000}, {2000, 2000}, {2000, 2000}, + {2000, 2000}, {2000, 2000}, {2000, 2000}, + {2000, 2000}, {2000, 2000}, {4000, 4000}, + {4000, 2000} }; + /*--------------------------------------------------------------------------*\ * main * @@ -218,7 +226,7 @@ shade_min = zmin + (zmax - zmin) * i / 10.0; shade_max = zmin + (zmax - zmin) * (i +1) / 10.0; sh_color = i+6; - plpsty((i + 2) % 8 + 1); + plpat(nlin[i],inc[i],del[i]); plshade1(&z[0][0], XPTS, YPTS, NULL, -1., 1., -1., 1., shade_min, shade_max, Modified: trunk/examples/c/x29c.c =================================================================== --- trunk/examples/c/x29c.c 2008-12-15 12:40:45 UTC (rev 9116) +++ trunk/examples/c/x29c.c 2008-12-15 12:45:13 UTC (rev 9117) @@ -27,6 +27,7 @@ #include <time.h> static PLFLT x[365], y[365]; +static PLFLT xerr1[365], xerr2[365], yerr1[365], yerr2[365]; /* Function prototypes */ @@ -78,7 +79,7 @@ PLFLT xmin, xmax, ymin, ymax; /* Data points every 10 minutes for 1 day */ - npts = 145; + npts = 73; xmin = 0; xmax = 60.0*60.0*24.0; /* Number of seconds in a day */ @@ -88,10 +89,21 @@ for (i=0;i<npts;i++) { x[i] = xmax*((PLFLT) i/(PLFLT)npts); y[i] = 15.0 - 5.0*cos( 2*M_PI*((PLFLT) i / (PLFLT) npts)); + /* Set x error bars to +/- 5 minute */ + xerr1[i] = x[i]-60*5; + xerr2[i] = x[i]+60*5; + /* Set y error bars to +/- 0.1 deg C */ + yerr1[i] = y[i]-0.1; + yerr2[i] = y[i]+0.1; } pladv(0); + /* Rescale major ticks marks by 0.5 */ + plsmaj(0,0.5); + /* Rescale minor ticks and error bar marks by 0.5 */ + plsmin(0,0.5); + plvsta(); plwind(xmin, xmax, ymin, ymax); @@ -107,6 +119,15 @@ plcol0(4); plline(npts, x, y); + plcol0(2); + plerrx(npts, xerr1, xerr2, y); + plcol0(3); + plerry(npts, x, yerr1, yerr2); + + /* Rescale major / minor tick marks back to default */ + plsmin(0,1.0); + plsmaj(0,1.0); + } /* Plot the number of hours of daylight as a function of day for a year */ @@ -142,6 +163,7 @@ plcol0(1); /* Set time format to be abbreviated month name followed by day of month */ pltimefmt("%b %d"); + plprec(1,1); plenv(xmin, xmax, ymin, ymax, 0, 40); @@ -152,6 +174,7 @@ plline(npts, x, y); + plprec(0,0); } void @@ -220,6 +243,8 @@ plcol0(4); + /* Rescale symbol size (used by plpoin) by 0.5 */ + plssym(0.0,0.5); plpoin(npts, x, y, 2); plline(npts, x, y); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-15 20:53:28
|
Revision: 9123 http://plplot.svn.sourceforge.net/plplot/?rev=9123&view=rev Author: andrewross Date: 2008-12-15 20:53:24 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Update example 15 to include a new page illustrating plfill3. Modified Paths: -------------- trunk/doc/docbook/src/api.xml trunk/examples/c/x15c.c Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2008-12-15 19:49:22 UTC (rev 9122) +++ trunk/doc/docbook/src/api.xml 2008-12-15 20:53:24 UTC (rev 9123) @@ -3107,7 +3107,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 15. </para> </sect1> Modified: trunk/examples/c/x15c.c =================================================================== --- trunk/examples/c/x15c.c 2008-12-15 19:49:22 UTC (rev 9122) +++ trunk/examples/c/x15c.c 2008-12-15 20:53:24 UTC (rev 9123) @@ -18,17 +18,11 @@ static void plot1 (void); static void plot2 (void); +static void plot3 (void); static void f2mnmx (PLFLT *, PLINT, PLINT, PLFLT *, PLFLT *); static void cmap1_init1 (void); static void cmap1_init2 (void); -static PLINT nlin[10] = {1, 1, 1, 1, 1, 2, 2, 2, 2, 2}; -static PLINT inc[10][2] = { {450, 0}, {-450, 0}, {0, 0}, {900, 0}, {300, 0}, - {450,-450}, {0, 900}, {0, 450}, {450, -450}, {0, 900} }; -static PLINT del[10][2] = { {2000, 2000}, {2000, 2000}, {2000, 2000}, - {2000, 2000}, {2000, 2000}, {2000, 2000}, - {2000, 2000}, {2000, 2000}, {4000, 4000}, - {4000, 2000} }; /*--------------------------------------------------------------------------*\ * main @@ -72,6 +66,7 @@ plot1(); plot2(); + plot3(); plend(); exit(0); @@ -214,6 +209,15 @@ PLINT sh_cmap = 0, sh_width; PLINT min_color = 0, min_width = 0, max_color = 0, max_width = 0; int i; + static PLINT nlin[10] = {1, 1, 1, 1, 1, 2, 2, 2, 2, 2}; + static PLINT inc[10][2] = { {450, 0}, {-450, 0}, {0, 0}, {900, 0}, + {300, 0}, {450,-450}, {0, 900}, {0, 450}, + {450, -450}, {0, 900} }; + static PLINT del[10][2] = { {2000, 2000}, {2000, 2000}, {2000, 2000}, + {2000, 2000}, {2000, 2000}, {2000, 2000}, + {2000, 2000}, {2000, 2000}, {4000, 4000}, + {4000, 2000} }; + sh_width = 2; pladv(0); @@ -242,6 +246,46 @@ } /*--------------------------------------------------------------------------*\ + * plot3 + * + * Illustrates shaded regions in 3d, using a different fill pattern for + * each region. +\*--------------------------------------------------------------------------*/ + +static void +plot3(void) +{ + static PLFLT xx[2][5] = { {-1.0, 1.0, 1.0, -1.0, -1.0}, + {-1.0, 1.0, 1.0, -1.0, -1.0} }; + static PLFLT yy[2][5] = { {1.0, 1.0, 0.0, 0.0, 1.0}, + {-1.0, -1.0, 0.0, 0.0, -1.0} }; + static PLFLT zz[2][5] = { {0.0, 0.0, 1.0, 1.0, 0.0}, + {0.0, 0.0, 1.0, 1.0, 0.0} }; + + pladv(0); + plvpor(0.1, 0.9, 0.1, 0.9); + plwind(-1.0, 1.0, -1.0, 1.0); + plw3d(1., 1., 1., -1.0, 1.0, -1.0, 1.0, 0.0, 1.5, 30, -40); + +/* Plot using identity transform */ + + plcol0(1); + plbox3("bntu", "X", 0.0, 0, "bntu", "Y", 0.0, 0, "bcdfntu", "Z", 0.5, 0); + plcol0(2); + pllab("","","3-d polygon filling"); + + plcol0(3); + plpsty(1); + plline3(5, xx[0], yy[0], zz[0]); + plfill3(4, xx[0], yy[0], zz[0]); + plpsty(2); + plline3(5, xx[1], yy[1], zz[1]); + plfill3(4, xx[1], yy[1], zz[1]); + + +} + +/*--------------------------------------------------------------------------*\ * f2mnmx * * Returns min & max of input 2d array. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-15 21:23:06
|
Revision: 9124 http://plplot.svn.sourceforge.net/plplot/?rev=9124&view=rev Author: airwin Date: 2008-12-15 21:23:03 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Add prototype of example 31 for testing PLplot set/get functions. Modified Paths: -------------- trunk/examples/c/CMakeLists.txt trunk/examples/c/Makefile.examples.in trunk/plplot_test/test_c.sh.in Added Paths: ----------- trunk/examples/c/x31c.c Modified: trunk/examples/c/CMakeLists.txt =================================================================== --- trunk/examples/c/CMakeLists.txt 2008-12-15 20:53:24 UTC (rev 9123) +++ trunk/examples/c/CMakeLists.txt 2008-12-15 21:23:03 UTC (rev 9124) @@ -54,6 +54,7 @@ "28" "29" "30" + "31" ) if(BUILD_TEST) Modified: trunk/examples/c/Makefile.examples.in =================================================================== --- trunk/examples/c/Makefile.examples.in 2008-12-15 20:53:24 UTC (rev 9123) +++ trunk/examples/c/Makefile.examples.in 2008-12-15 21:23:03 UTC (rev 9124) @@ -63,6 +63,7 @@ x28c$(EXEEXT) \ x29c$(EXEEXT) \ x30c$(EXEEXT) \ + x31c$(EXEEXT) \ $(PLPLOTCANVAS_EXECUTABLES_list) all: $(EXECUTABLES_list) Added: trunk/examples/c/x31c.c =================================================================== --- trunk/examples/c/x31c.c (rev 0) +++ trunk/examples/c/x31c.c 2008-12-15 21:23:03 UTC (rev 9124) @@ -0,0 +1,38 @@ +/* $Id$ + + set/get tester +*/ + +#include "plcdemos.h" + +/*--------------------------------------------------------------------------*\ + * main + * + * Demonstrates absolute positioning of graphs on a page. + \*--------------------------------------------------------------------------*/ + +int +main(int argc, const char *argv[]) +{ + PLFLT xmin, xmax, ymin, ymax; + /* Parse and process command line arguments */ + + (void) plparseopts(&argc, argv, PL_PARSE_FULL); + + /* Initialize plplot */ + + plinit(); + + pladv(0); + plvpor(0.0, 1.0, 0.0, 1.0); + + plwind(0.2, 0.3, 0.4, 0.5); + plgvpw(&xmin, &xmax, &ymin, &ymax); + if (xmin != 0.2 || xmax != 0.3 || ymin != 0.4 || ymax != 0.5) { + fprintf(stderr, "%s\n", "plgvpi test failed"); + plend(); + exit(1); + } + plend(); + exit(0); +} Property changes on: trunk/examples/c/x31c.c ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_c.sh.in =================================================================== --- trunk/plplot_test/test_c.sh.in 2008-12-15 20:53:24 UTC (rev 9123) +++ trunk/plplot_test/test_c.sh.in 2008-12-15 21:23:03 UTC (rev 9124) @@ -32,7 +32,7 @@ lang="c" export index lang for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 \ - 21 22 23 24 25 26 27 28 29 30; do + 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}${lang}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-16 13:22:19
|
Revision: 9127 http://plplot.svn.sourceforge.net/plplot/?rev=9127&view=rev Author: andrewross Date: 2008-12-16 11:40:32 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Further updates to C examples to more fully test the common API. Modified Paths: -------------- trunk/doc/docbook/src/api.xml trunk/examples/c/x01c.c trunk/examples/c/x03c.c trunk/examples/c/x13c.c trunk/examples/c/x29c.c trunk/examples/c/x31c.c Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2008-12-15 21:41:52 UTC (rev 9126) +++ trunk/doc/docbook/src/api.xml 2008-12-16 11:40:32 UTC (rev 9127) @@ -339,7 +339,7 @@ </para> <para> - This function is used in examples 1,2,4,6-12,14-18,20,21,23-27,29. + This function is used in examples 1,2,4,6-12,14-18,20,21,23-27,29,31. </para> </sect1> @@ -1499,7 +1499,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -3565,7 +3565,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -3646,7 +3646,7 @@ </variablelist> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -3693,7 +3693,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -3827,7 +3827,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -3968,7 +3968,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -4039,7 +4039,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -4130,7 +4130,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -4279,7 +4279,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -4386,7 +4386,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -4957,7 +4957,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -5049,7 +5049,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -5115,7 +5115,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -5176,7 +5176,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -5237,7 +5237,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -9057,7 +9057,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -9154,7 +9154,7 @@ </variablelist> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -9754,7 +9754,7 @@ </para> <para> - This function is used in example 15. + This function is used in examples 15,31. </para> </sect1> @@ -9836,7 +9836,7 @@ </variablelist> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -9882,7 +9882,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -9930,7 +9930,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -10065,7 +10065,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -10312,7 +10312,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -10401,7 +10401,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -10510,7 +10510,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 29. </para> </sect1> @@ -10645,7 +10645,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -12027,7 +12027,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 3. </para> </sect1> @@ -12135,7 +12135,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -12410,7 +12410,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 1. </para> </sect1> @@ -13423,7 +13423,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -13486,7 +13486,7 @@ </para> <para> - This function is used in examples 1,14. + This function is used in examples 1,14,31. </para> </sect1> @@ -13635,7 +13635,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 31. </para> </sect1> @@ -13825,7 +13825,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 13. </para> </sect1> @@ -14142,7 +14142,7 @@ </para> <para> - This function is used in examples 2,6-8,10,11,15,16,18,21,23,24,26,27. + This function is used in examples 2,6-8,10,11,15,16,18,21,23,24,26,27,31. </para> </sect1> @@ -14501,7 +14501,7 @@ </para> <para> - This function is used in examples 1,2,4,6-12,14-16,18,21,23-27,29. + This function is used in examples 1,2,4,6-12,14-16,18,21,23-27,29,31. </para> </sect1> Modified: trunk/examples/c/x01c.c =================================================================== --- trunk/examples/c/x01c.c 2008-12-15 21:41:52 UTC (rev 9126) +++ trunk/examples/c/x01c.c 2008-12-16 11:40:32 UTC (rev 9127) @@ -111,10 +111,7 @@ char ver[80]; /* plplot initialization */ -/* Divide page into 2x2 plots unless user overrides */ - plssub(2, 2); - /* Parse and process command line arguments */ plMergeOpts(options, "x01c options", notes); @@ -126,8 +123,10 @@ fprintf(stdout, "PLplot library version: %s\n", ver); /* Initialize plplot */ +/* Divide page into 2x2 plots */ +/* Note: calling plstar replaces separate calls to plssub and plinit */ + plstar(2,2); - plinit(); /* Select font set as per input flag */ if (fontset) Modified: trunk/examples/c/x03c.c =================================================================== --- trunk/examples/c/x03c.c 2008-12-15 21:41:52 UTC (rev 9126) +++ trunk/examples/c/x03c.c 2008-12-16 11:40:32 UTC (rev 9127) @@ -30,6 +30,10 @@ (void) plparseopts(&argc, argv, PL_PARSE_FULL); +/* Set orientation to landscape - note not all device drivers + * support this, in particular most interactive drivers do not */ + plsori(1); + /* Initialize plplot */ plinit(); Modified: trunk/examples/c/x13c.c =================================================================== --- trunk/examples/c/x13c.c 2008-12-15 21:41:52 UTC (rev 9126) +++ trunk/examples/c/x13c.c 2008-12-16 11:40:32 UTC (rev 9127) @@ -41,7 +41,12 @@ plinit(); - plenv(0., 10., 0., 10., 1, -2); + pladv(0); + /* Ensure window has aspect ratio of one so circle is + * plotted as a circle. */ + plvasp(1.0); + plwind(0., 10., 0., 10.); + //plenv(0., 10., 0., 10., 1, -2); plcol0(2); /* n.b. all theta quantities scaled by 2*M_PI/500 to be integers to avoid * floating point logic problems. */ Modified: trunk/examples/c/x29c.c =================================================================== --- trunk/examples/c/x29c.c 2008-12-15 21:41:52 UTC (rev 9126) +++ trunk/examples/c/x29c.c 2008-12-16 11:40:32 UTC (rev 9127) @@ -60,6 +60,9 @@ /* Initialize plplot */ plinit(); + /* Change the escape character to a '@' instead of the default '#' + plsesc('@'); + plot1(); plot2(); @@ -114,7 +117,7 @@ plbox("bcnstd", 3.0*60*60, 3, "bcnstv", 1, 5); plcol0(3); - pllab("Time (hours:mins)", "Temperature (degC)", "#frPLplot Example 29 - Daily temperature"); + pllab("Time (hours:mins)", "Temperature (degC)", "@frPLplot Example 29 - Daily temperature"); plcol0(4); @@ -168,7 +171,7 @@ plcol0(3); - pllab("Date", "Hours of daylight", "#frPLplot Example 29 - Hours of daylight at 51.5N"); + pllab("Date", "Hours of daylight", "@frPLplot Example 29 - Hours of daylight at 51.5N"); plcol0(4); @@ -239,7 +242,7 @@ plbox("bcnstd", 14*24.0*60.0*60.0,14, "bcnstv", 1, 4); plcol0(3); - pllab("Date", "Hours of television watched", "#frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); + pllab("Date", "Hours of television watched", "@frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); plcol0(4); Modified: trunk/examples/c/x31c.c =================================================================== --- trunk/examples/c/x31c.c 2008-12-15 21:41:52 UTC (rev 9126) +++ trunk/examples/c/x31c.c 2008-12-16 11:40:32 UTC (rev 9127) @@ -14,25 +14,178 @@ int main(int argc, const char *argv[]) { - PLFLT xmin, xmax, ymin, ymax; + PLFLT xmin, xmax, ymin, ymax, wx, wy; + PLFLT mar, aspect, jx, jy, ori; + PLINT win, level, digmax, digits, compression; + PLFLT xp, yp, xp2, yp2; + PLINT xleng, yleng, xoff, yoff, xleng2, yleng2; + PLINT fam, num, bmax, r, g, b; + PLFLT a; + PLINT r1[] = {0, 255}; + PLINT g1[] = {255, 0}; + PLINT b1[] = {0, 0}; + PLFLT a1[] = {1.0, 1.0}; + char fnam[80]; + /* Parse and process command line arguments */ (void) plparseopts(&argc, argv, PL_PARSE_FULL); + /* Test setting / getting page size */ + plgpage(&xp, &yp, &xleng, &yleng, &xoff, &yoff); + xp2 = xp*0.9; + yp2 = yp*0.9; + xleng2 = (PLINT)(xleng*0.9); + yleng2 = (PLINT)(yleng*0.9); + plspage(xp2, yp2, xleng2, yleng2, xoff, yoff); + plgpage(&xp, &yp, &xleng, &yleng, &xoff, &yoff); + if (xp != xp2 || yp != yp2 || xleng != xleng2 || yleng != yleng2) { + fputs("plgpage test failed\n",stderr); + plend(); + exit(1); + } + + plscompression(1); + plgcompression(&compression); + if (compression != 1) { + fputs("plgcompression test failed\n",stderr); + plend(); + exit(1); + } + + plsfam(1,1,100000); + plgfam(&fam, &num, &bmax); + if (fam != 1 || num != 1 || bmax != 100000) { + fputs("plgfam test failed\n",stderr); + plend(); + exit(1); + } + /* Initialize plplot */ plinit(); + plscolor(1); + + plscol0(1, 255, 0, 0); + + plscmap1(r1,g1,b1,2); + plscmap1a(r1,g1,b1,a1,2); + + plglevel(&level); + if (level != 1) { + fprintf(stderr,"plglevel test failed. Level is %d, but 1 expected.\n",level); + plend(); + exit(1); + } + pladv(0); plvpor(0.0, 1.0, 0.0, 1.0); plwind(0.2, 0.3, 0.4, 0.5); plgvpw(&xmin, &xmax, &ymin, &ymax); if (xmin != 0.2 || xmax != 0.3 || ymin != 0.4 || ymax != 0.5) { - fprintf(stderr, "%s\n", "plgvpw test failed"); + fputs("plgvpw test failed\n",stderr); plend(); exit(1); } + + plgvpd(&xmin, &xmax, &ymin, &ymax); + if (xmin != 0.0 || xmax != 1.0 || ymin != 0.0 || ymax != 1.0) { + fputs("plgvpd test failed\n",stderr); + plend(); + exit(1); + } + + /* Get world coordinates for 0.5,0.5 which is in the middle of + * the window */ + plcalc_world(0.5,0.5,&wx,&wy,&win); + if (fabs(wx-0.25)>1.0E-5 || fabs(wy-0.45)>1.0E-5) { + fputs("plcalc_world test failed\n",stderr); + plend(); + exit(1); + } + + /* Retrieve and print the name of the output file (if any) */ + plgfnam(fnam); + printf("Output file name is %s\n",fnam); + + /* Set and get the number of digits used to display axis labels */ + /* Note digits is currently ignored in pls[xyz]ax and + therefore it does not make sense to test the returned + value */ + plsxax(3,0); + plgxax(&digmax,&digits); + if (digmax != 3) { + fputs("plgxax test failed\n",stderr); + plend(); + exit(1); + } + + plsyax(3,0); + plgyax(&digmax,&digits); + if (digmax != 3) { + fputs("plgyax test failed\n",stderr); + plend(); + exit(1); + } + + plszax(3,0); + plgzax(&digmax,&digits); + if (digmax != 3) { + fputs("plgzax test failed\n",stderr); + plend(); + exit(1); + } + + plsdidev(0.05, PL_NOTSET, 0.0, 0.0); + plgdidev(&mar, &aspect, &jx, &jy); + if (mar != 0.05 || jx != 0.0 || jy != 0.0) { + fputs("plgdidev test failed\n",stderr); + plend(); + exit(1); + } + + plsdiori(1.0); + plgdiori(&ori); + if (ori != 1.0) { + fputs("plgdiori test failed\n",stderr); + plend(); + exit(1); + } + + plsdiplt(0.1, 0.1, 0.9, 0.9); + plgdiplt(&xmin, &ymin, &xmax, &ymax); + if (xmin != 0.1 || xmax != 0.9 || ymin != 0.1 || ymax != 0.9) { + fputs("plgdiplt test failed\n",stderr); + plend(); + exit(1); + } + + plsdiplz(0.1, 0.1, 0.9, 0.9); + plgdiplt(&xmin, &ymin, &xmax, &ymax); + if (xmin != 0.1+0.8*0.1 || xmax != 0.1+0.8*0.9 || ymin != 0.1+0.8*0.1 || ymax != 0.1+0.8*0.9) { + fputs("plsdiplz test failed\n",stderr); + plend(); + exit(1); + } + + plscolbg(0,0,0); + plgcolbg(&r, &g, &b); + if (r != 0 || g != 0 || b != 0) { + fputs("plgcolbg test failed\n",stderr); + plend(); + exit(1); + } + + plscolbga(0,0,0,1.0); + plgcolbga(&r, &g, &b, &a); + if (r != 0 || g != 0 || b != 0 || a != 1.0) { + fputs("plgcolbga test failed\n",stderr); + plend(); + exit(1); + } + plend(); exit(0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-16 14:13:52
|
Revision: 9134 http://plplot.svn.sourceforge.net/plplot/?rev=9134&view=rev Author: andrewross Date: 2008-12-16 14:13:49 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Update f77 and f95 examples to reflect recent changes and to include the new example 31. Modified Paths: -------------- trunk/examples/f77/CMakeLists.txt trunk/examples/f77/x01f.fm4 trunk/examples/f77/x03f.fm4 trunk/examples/f77/x09f.fm4 trunk/examples/f77/x13f.fm4 trunk/examples/f77/x15f.fm4 trunk/examples/f77/x29f.fm4 trunk/examples/f95/CMakeLists.txt trunk/examples/f95/x01f.f90 trunk/examples/f95/x03f.f90 trunk/examples/f95/x09f.f90 trunk/examples/f95/x13f.f90 trunk/examples/f95/x15f.f90 trunk/examples/f95/x29f.f90 trunk/plplot_test/test_f77.sh.in trunk/plplot_test/test_f95.sh.in Added Paths: ----------- trunk/examples/f77/x31f.fm4 Modified: trunk/examples/f77/CMakeLists.txt =================================================================== --- trunk/examples/f77/CMakeLists.txt 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/CMakeLists.txt 2008-12-16 14:13:49 UTC (rev 9134) @@ -52,6 +52,7 @@ "28" "29" "30" +"31" ) foreach(STRING_INDEX ${f77_STRING_INDICES}) Modified: trunk/examples/f77/x01f.fm4 =================================================================== --- trunk/examples/f77/x01f.fm4 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/x01f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -35,16 +35,14 @@ C Process command-line arguments call plparseopts(PL_PARSE_FULL) -C Divide page into 2x2 plots - call plssub(2, 2) - C Print plplot version call plgver(version) write (*,'(a,a)') 'PLplot library version: ', & version(:lnblnk(version)) C Initialize plplot - call plinit() +C Divide page into 2x2 plots + call plstar(2,2) C Set up the data C Original case Modified: trunk/examples/f77/x03f.fm4 =================================================================== --- trunk/examples/f77/x03f.fm4 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/x03f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -32,6 +32,9 @@ C Process command-line arguments call plparseopts(PL_PARSE_FULL) +C Set orientation to landscape - note not all device drivers +C support this, in particular most interactive drivers do not. + call plsori(1) dtr = PI/180.0d0 do i=0,360 Modified: trunk/examples/f77/x09f.fm4 =================================================================== --- trunk/examples/f77/x09f.fm4 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/x09f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -87,6 +87,7 @@ call plinit C Plot using identity transform + call pl_setcontlabelformat(4,3) call pl_setcontlabelparam(0.006d0, 0.3d0, 0.1d0, 1) call plenv(-1.0d0, 1.0d0, -1.0d0, 1.0d0, 0, 0) call plcol0(2) Modified: trunk/examples/f77/x13f.fm4 =================================================================== --- trunk/examples/f77/x13f.fm4 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/x13f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -42,7 +42,12 @@ call plinit() - call plenv( 0.d0, 10.d0, 0.d0, 10.d0, 1, -2 ) + call pladv(0) +C Ensure window has aspect ratio of one so circle is +C plotted as a circle. + call plvasp(1.0d0) + call plwind(0.d0, 10.d0, 0.d0, 10.d0) +C call plenv( 0.d0, 10.d0, 0.d0, 10.d0, 1, -2 ) call plcol0(2) C n.b. all theta quantities scaled by 2*pi/500 to be integers to avoid Modified: trunk/examples/f77/x15f.fm4 =================================================================== --- trunk/examples/f77/x15f.fm4 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/x15f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -59,6 +59,7 @@ call plot1(z, XPTS, YPTS, zmin, zmax, xdim) call plot2(z, XPTS, YPTS, zmin, zmax, xdim) + call plot3() call plend() end @@ -226,8 +227,20 @@ real*8 shade_min, shade_max, sh_color integer sh_cmap, sh_width integer min_color, min_width, max_color, max_width - integer i + integer i,j + integer nlin(10), inc(2,10), del(2,10) + data nlin /1, 1, 1, 1, 1, 2, 2, 2, 2, 2/ + data ( (inc(i,j), i=1,2), j=1,10) / + & 450, 0, -450, 0, 0, 0, 900, 0, + & 300, 0, 450,-450, 0, 900, 0, 450, + & 450, -450, 0, 900/ + data ( (del(i,j), i=1,2), j=1,10) / + & 2000, 2000, 2000, 2000, 2000, 2000, + & 2000, 2000, 2000, 2000, 2000, 2000, + & 2000, 2000, 2000, 2000, 4000, 4000, + & 4000, 2000/ + sh_cmap = 0 min_color = 0 min_width = 0 @@ -245,7 +258,7 @@ shade_min = zmin + (zmax - zmin) * (i-1) / 10.0d0 shade_max = zmin + (zmax - zmin) * i / 10.0d0 sh_color = i+5 - call plpsty(mod((i + 1),8) + 1) + call plpat(nlin(i),inc(1,i),del(1,i)) C Use_ plshade0 instead of plshade1 - identity mapping call plshade0(z, XPTS, YPTS, undefined, & -1.d0, 1.d0, -1.d0, 1.d0, @@ -258,7 +271,48 @@ call plbox('bcnst', 0.0d0, 0, 'bcnstv', 0.0d0, 0) call plcol0(2) call pllab('distance', 'altitude', 'Bogon flux') + + end +C-------------------------------------------------------------------------- +C plot3 +C +C Illustrates shaded regions in 3d, using a different fill pattern for +C each region. +C-------------------------------------------------------------------------- + + subroutine plot3 + implicit none + real*8 xx1(5), xx2(5), yy1(5), yy2(5), zz1(5), zz2(5) + data xx1 / -1.0d0, 1.0d0, 1.0d0, -1.0d0, -1.0d0/ + data xx2 / -1.0d0, 1.0d0, 1.0d0, -1.0d0, -1.0d0/ + data yy1 /1.0d0, 1.0d0, 0.0d0, 0.0d0, 1.0d0/ + data yy2 / -1.0d0, -1.0d0, 0.0d0, 0.0d0, -1.0d0/ + data zz1 / 0.0d0, 0.0d0, 1.0d0, 1.0d0, 0.0d0/ + data zz2 / 0.0d0, 0.0d0, 1.0d0, 1.0d0, 0.0d0/ + + call pladv(0) + call plvpor(0.1d0, 0.9d0, 0.1d0, 0.9d0) + call plwind(-1.0d0, 1.0d0, -1.0d0, 1.0d0) + call plw3d(1.d0, 1.d0, 1.d0, -1.0d0, 1.0d0, -1.0d0, 1.0d0, 0.0d0, + & 1.5d0, 30.d0, -40.d0) + +C Plot using identity transform + + call plcol0(1) + call plbox3("bntu", "X", 0.0d0, 0, "bntu", "Y", 0.0d0, 0, + & "bcdfntu", "Z", 0.5d0, 0) + call plcol0(2) + call pllab("","","3-d polygon filling") + + call plcol0(3) + call plpsty(1) + call plline3(5, xx1, yy1, zz1) + call plfill3(4, xx1, yy1, zz1) + call plpsty(2) + call plline3(5, xx2, yy2, zz2) + call plfill3(4, xx2, yy2, zz2) + end C---------------------------------------------------------------------------- Modified: trunk/examples/f77/x29f.fm4 =================================================================== --- trunk/examples/f77/x29f.fm4 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f77/x29f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -25,8 +25,9 @@ implicit none - real*8 x(365), y(365) - common /plotdat/ x, y + real*8 x(365), y(365), xerr1(365), xerr2(365), yerr1(365), + & yerr2(365) + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 integer PL_PARSE_FULL parameter(PL_PARSE_FULL = 1) @@ -35,6 +36,9 @@ call plinit() +C This is the ASCII value for character @ + call plsesc(64) + call plot1() call plot2() call plot3() @@ -49,13 +53,14 @@ subroutine plot1() implicit none - real*8 x(365), y(365) - common /plotdat/ x, y + real*8 x(365), y(365), xerr1(365), xerr2(365), yerr1(365), + & yerr2(365) + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 integer i, npts real*8 xmin, xmax, ymin, ymax - parameter(npts = 145) + parameter(npts = 73) parameter(xmin = 0.0d0) parameter(xmax = 60.0d0*60.0d0*24.0d0) parameter(ymin = 10.0d0) @@ -67,9 +72,21 @@ do i = 1,npts x(i) = xmax*(dble(i-1)/dble(npts)) y(i) = 15.0d0 - 5.0d0*cos(2.0d0*PI*dble(i-1)/dble(npts)) +C Set x error bars to +/- 5 minute + xerr1(i) = x(i)-60.0d0*5.0d0 + xerr2(i) = x(i)+60.0d0*5.0d0 +C Set y error bars to +/- 0.1 deg C + yerr1(i) = y(i)-0.1d0 + yerr2(i) = y(i)+0.1d0 enddo call pladv(0) + +C Rescale major ticks marks by 0.5 + call plsmaj(0.0d0,0.5d0) +C Rescale minor ticks and error bar marks by 0.5 + call plsmin(0.0d0,0.5d0) + call plvsta() call plwind(xmin, xmax, ymin, ymax) @@ -81,12 +98,20 @@ call plcol0(3) call pllab("Time (hours:mins)", "Temperature (degC)", - & "#frPLplot Example 29 - Daily temperature") + & "@frPLplot Example 29 - Daily temperature") call plcol0(4) call plline(npts, x, y) + call plcol0(2) + call plerrx(npts, xerr1, xerr2, y) + call plcol0(3) + call plerry(npts, x, yerr1, yerr2) +C Rescale major / minor tick marks back to default + call plsmin(0.0d0,1.0d0) + call plsmaj(0.0d0,1.0d0) + end c @@ -98,8 +123,9 @@ integer j, npts real*8 xmin, xmax, ymin, ymax real*8 lat, p, d - real*8 x(365), y(365) - common /plotdat/ x, y + real*8 x(365), y(365), xerr1(365), xerr2(365), yerr1(365), + & yerr2(365) + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 c Latitude for London @@ -131,15 +157,18 @@ call plcol0(1) c Set time format to be abbreviated month name followed by day of month call pltimefmt("%b %d") + call plprec(1,1) call plenv(xmin, xmax, ymin, ymax, 0, 40) call plcol0(3) call pllab("Date", "Hours of daylight", - & "#frPLplot Example 29 - Hours of daylight at 51.5N") + & "@frPLplot Example 29 - Hours of daylight at 51.5N") call plcol0(4) call plline(npts, x, y) + + call plprec(0,0) end @@ -153,8 +182,9 @@ real*8 xmin, xmax, ymin, ymax integer tstart, t1, t2 real*8 toff; - real*8 x(365), y(365) - common /plotdat/ x, y + real*8 x(365), y(365), xerr1(365), xerr2(365), yerr1(365), + & yerr2(365) + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 real*8 PI parameter (PI = 3.1415926535897932384d0) @@ -194,11 +224,12 @@ call plcol0(3) call pllab("Date", "Hours of television watched", - & "#frPLplot Example 29 - Hours of television watched in " // - & "Dec 2005 / Jan 2006"); + & "@frPLplot Example 29 - Hours of television watched in " // + & "Dec 2005 / Jan 2006") call plcol0(4) + call plssym(0.0d0,0.5d0) call plpoin(npts, x, y, 2) call plline(npts, x, y) Added: trunk/examples/f77/x31f.fm4 =================================================================== --- trunk/examples/f77/x31f.fm4 (rev 0) +++ trunk/examples/f77/x31f.fm4 2008-12-16 14:13:49 UTC (rev 9134) @@ -0,0 +1,220 @@ +C $Id:$ +C set / get tester. +C +C Copyright (C) 2008 Alan W. Irwin +C Copyright (C) 2008 Andrew Ross +C +C This file is part of PLplot. +C +C PLplot is free software; you can redistribute it and/or modify +C it under the terms of the GNU General Library Public License as +C published by the Free Software Foundation; either version 2 of the +C License, or (at your option) any later version. +C +C PLplot is distributed in the hope that it will be useful, +C but WITHOUT ANY WARRANTY; without even the implied warranty of +C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +C GNU Library General Public License for more details. +C +C You should have received a copy of the GNU Library General Public +C License along with PLplot; if not, write to the Free Software +C Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +C-------------------------------------------------------------------------- +C main +C +C Demonstrates absolute positioning of graphs on a page. +C-------------------------------------------------------------------------- + + implicit none + real*8 xmin, xmax, ymin, ymax, wx, wy + real*8 mar, aspect, jx, jy, ori + integer win, level, digmax, digits, compression + real*8 xp, yp, xp2, yp2 + integer xleng, yleng, xoff, yoff, xleng2, yleng2 + integer fam, num, bmax, fam1, num1, bmax1, r, g, b + real*8 a + integer r1(2), g1(2), b1(2) + data r1 /0, 255/ + data g1 /255, 0/ + data b1 /0, 0/ + real*8 a1(2) + data a1 /1.0d0, 1.0d0/ + character*80 fnam + +C Parse and process command line arguments + + integer PL_PARSE_FULL + parameter(PL_PARSE_FULL = 1) + real*8 PL_NOTSET + parameter(PL_NOTSET = -42.0d0) + call plparseopts(PL_PARSE_FULL) + +C Test setting / getting page size + call plgpage(xp, yp, xleng, yleng, xoff, yoff) + xp2 = xp*0.9d0 + yp2 = yp*0.9d0 + xleng2 = int(xleng*0.9d0) + yleng2 = int(yleng*0.9d0) + call plspage(xp2, yp2, xleng2, yleng2, xoff, yoff) + call plgpage(xp, yp, xleng, yleng, xoff, yoff) + if (xp.ne.xp2 .or. yp .ne. yp2 .or. xleng .ne. xleng2 .or. + & yleng .ne. yleng2) then + write (0,*) "plgpage test failed" + call plend() + call exit(1) + endif + + call plscompression(1) + call plgcompression(compression) + if (compression .ne. 1) then + write (0,*) "plgcompression test failed" + call plend() + call exit(1) + endif + + call plgfam(fam, num, bmax) + call plsfam(1,1,100000) + call plgfam(fam1, num1, bmax1) + if (fam1 .ne. 1 .or. num1 .ne. 1 .or. bmax1 .ne. 100000) then + write (0,*) "plgfam test failed" + call plend() + call exit(1) + endif + call plsfam(fam, num, bmax) + +C Initialize plplot + + call plinit() + + call plscolor(1) + + call plscol0(1, 255, 0, 0) + + call plscmap1(r1,g1,b1,2) + call plscmap1a(r1,g1,b1,a1,2) + + call plglevel(level) + if (level .ne. 1) then + write(0,*) "plglevel test failed. Level is ",level, + & ", but 1 expected." + call plend() + call exit(1) + endif + + call pladv(0) + call plvpor(0.0d0, 1.0d0, 0.0d0, 1.0d0) + + call plwind(0.2d0, 0.3d0, 0.4d0, 0.5d0) + call plgvpw(xmin, xmax, ymin, ymax) + if (xmin .ne. 0.2d0 .or. xmax .ne. 0.3d0 .or. ymin .ne. 0.4d0 .or. + & ymax .ne. 0.5d0) then + write (0,*) "plgvpw test failed",xmin,xmax,ymin,ymax + call plend() + call exit(1) + endif + + call plgvpd(xmin, xmax, ymin, ymax) + if (xmin .ne. 0.0d0 .or. xmax .ne. 1.0d0 .or. ymin .ne. 0.0d0 .or. + & ymax .ne. 1.0d0) then + write (0,*) "plgvpd test failed" + call plend() + call exit(1) + endif + +C Get world coordinates for 0.5,0.5 which is in the middle of +C the window + call plcalc_world(0.5d0,0.5d0,wx,wy,win) + if (abs(wx-0.25d0).gt.1.0d-5 .or. abs(wy-0.45d0).gt.1.0d-5) then + write (0,*) "plcalc_world test failed" + call plend() + call exit(1) + endif + +C Retrieve and print the name of the output file (if any) + call plgfnam(fnam) + print *,"Output file name is ",fnam + +C Set and get the number of digits used to display axis labels +C Note digits is currently ignored in pls[xyz]ax and +C therefore it does not make sense to test the returned +C value + call plsxax(3,0) + call plgxax(digmax,digits) + if (digmax .ne. 3) then + write (0,*) "plgxax test failed" + call plend() + call exit(1) + endif + + call plsyax(3,0) + call plgyax(digmax,digits) + if (digmax .ne. 3) then + write (0,*) "plgyax test failed" + call plend() + call exit(1) + endif + + call plszax(3,0) + call plgzax(digmax,digits) + if (digmax .ne. 3) then + write(0,*) "plgzax test failed" + call plend() + call exit(1) + endif + + call plsdidev(0.05d0, PL_NOTSET, 0.0d0, 0.0d0) + call plgdidev(mar, aspect, jx, jy) + if (mar .ne. 0.05d0 .or. jx .ne. 0.0d0 .or. jy .ne. 0.0d0) then + write(0,*) "plgdidev test failed" + call plend() + call exit(1) + endif + + call plsdiori(1.0d0) + call plgdiori(ori) + if (ori .ne. 1.0d0) then + write(0,*) "plgdiori test failed" + call plend() + call exit(1) + endif + + call plsdiplt(0.1d0, 0.1d0, 0.9d0, 0.9d0) + call plgdiplt(xmin, ymin, xmax, ymax) + if (xmin .ne. 0.1d0 .or. xmax .ne. 0.9d0 .or. ymin .ne. 0.1d0 .or. + & ymax .ne. 0.9d0) then + write(0,*) "plgdiplt test failed" + call plend() + call exit(1) + endif + + call plsdiplz(0.1d0, 0.1d0, 0.9d0, 0.9d0) + call plgdiplt(xmin, ymin, xmax, ymax) + if (xmin .ne. 0.1d0+0.8d0*0.1d0 .or. + & xmax .ne. 0.1d0+0.8d0*0.9d0 .or. + & ymin .ne. 0.1d0+0.8d0*0.1d0 .or. + & ymax .ne. 0.1d0+0.8d0*0.9d0) then + write(0,*) "plsdiplz test failed" + call plend() + call exit(1) + endif + + call plscolbg(0,0,0) + call plgcolbg(r, g, b) + if (r .ne. 0 .or. g .ne. 0 .or. b .ne. 0) then + write(0,*) "plgcolbg test failed" + call plend() + call exit(1) + endif + + call plscolbga(0,0,0,1.0d0) + call plgcolbga(r, g, b, a) + if (r .ne. 0 .or. g .ne. 0 .or. b .ne. 0 .or. a .ne. 1.0d0) then + write(0,*) "plgcolbga test failed" + call plend() + call exit(1) + endif + + call plend() + call exit(0) + end Property changes on: trunk/examples/f77/x31f.fm4 ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/examples/f95/CMakeLists.txt =================================================================== --- trunk/examples/f95/CMakeLists.txt 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/CMakeLists.txt 2008-12-16 14:13:49 UTC (rev 9134) @@ -52,6 +52,7 @@ "28" "29" "30" +"31" ) # Process fortran header file to define isnan Modified: trunk/examples/f95/x01f.f90 =================================================================== --- trunk/examples/f95/x01f.f90 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/x01f.f90 2008-12-16 14:13:49 UTC (rev 9134) @@ -31,15 +31,13 @@ ! Process command-line arguments call plparseopts(PL_PARSE_FULL) -! Divide page into 2x2 plots - call plssub(2, 2) - ! Print plplot version call plgver(version) write (*,'(a,a)') 'PLplot library version: ', trim(version) ! Initialize plplot - call plinit() +! Divide page into 2x2 plots + call plstar(2,2) ! Set up the data ! Original case Modified: trunk/examples/f95/x03f.f90 =================================================================== --- trunk/examples/f95/x03f.f90 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/x03f.f90 2008-12-16 14:13:49 UTC (rev 9134) @@ -29,6 +29,9 @@ ! Process command-line arguments call plparseopts(PL_PARSE_FULL) +! Set orientation to landscape - note not all device drivers +! support this, in particular most interactive drivers do not. + call plsori(1) dtr = PI/180.0_plflt do i=0,360 Modified: trunk/examples/f95/x09f.f90 =================================================================== --- trunk/examples/f95/x09f.f90 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/x09f.f90 2008-12-16 14:13:49 UTC (rev 9134) @@ -84,6 +84,7 @@ call plinit ! Plot using identity transform + call pl_setcontlabelformat(4,3) call pl_setcontlabelparam(0.006_plflt, 0.3_plflt, 0.1_plflt, 1) call plenv(-1.0_plflt, 1.0_plflt, -1.0_plflt, 1.0_plflt, 0, 0) call plcol0(2) Modified: trunk/examples/f95/x13f.f90 =================================================================== --- trunk/examples/f95/x13f.f90 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/x13f.f90 2008-12-16 14:13:49 UTC (rev 9134) @@ -39,7 +39,12 @@ call plinit() - call plenv( 0._plflt, 10._plflt, 0._plflt, 10._plflt, 1, -2 ) + call pladv(0) +! Ensure window has aspect ratio of one so circle is +! plotted as a circle. + call plvasp(1.0_plflt) + call plwind(0._plflt, 10._plflt, 0._plflt, 10._plflt) +! call plenv( 0._plflt, 10._plflt, 0._plflt, 10._plflt, 1, -2 ) call plcol0(2) ! n.b. all theta quantities scaled by 2*pi/500 to be integers to avoid Modified: trunk/examples/f95/x15f.f90 =================================================================== --- trunk/examples/f95/x15f.f90 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/x15f.f90 2008-12-16 14:13:49 UTC (rev 9134) @@ -58,6 +58,7 @@ call plot1(z, XPTS, YPTS, zmin, zmax, xdim) call plot2(z, XPTS, YPTS, zmin, zmax, xdim) + call plot3() call plend() end @@ -217,8 +218,20 @@ real(kind=plflt) shade_min, shade_max, sh_color integer sh_cmap, sh_width integer min_color, min_width, max_color, max_width - integer i + integer i, j + integer nlin(10), inc(2,10), del(2,10) + data nlin /1, 1, 1, 1, 1, 2, 2, 2, 2, 2/ + data ( (inc(i,j), i=1,2), j=1,10) / & + 450, 0, -450, 0, 0, 0, 900, 0, & + 300, 0, 450,-450, 0, 900, 0, 450, & + 450, -450, 0, 900/ + data ( (del(i,j), i=1,2), j=1,10) / & + 2000, 2000, 2000, 2000, 2000, 2000, & + 2000, 2000, 2000, 2000, 2000, 2000, & + 2000, 2000, 2000, 2000, 4000, 4000, & + 4000, 2000/ + sh_cmap = 0 min_color = 0 min_width = 0 @@ -236,7 +249,7 @@ shade_min = zmin + (zmax - zmin) * (i-1) / 10.0_plflt shade_max = zmin + (zmax - zmin) * i / 10.0_plflt sh_color = i+5 - call plpsty(mod((i + 1),8) + 1) + call plpat(nlin(i),inc(1,i),del(1,i)) ! Use_ plshade0 instead of plshade1 - identity mapping call plshade(z(:XPTS,:YPTS), undefined, & -1._plflt, 1._plflt, -1._plflt, 1._plflt, & @@ -251,7 +264,49 @@ call pllab('distance', 'altitude', 'Bogon flux') end +!-------------------------------------------------------------------------- +! plot3 +! +! Illustrates shaded regions in 3d, using a different fill pattern for +! each region. +!-------------------------------------------------------------------------- + subroutine plot3 + use plplot + implicit none + + real(kind=plflt) xx1(5), xx2(5), yy1(5), yy2(5), zz1(5), zz2(5) + data xx1 / -1.0_plflt, 1.0_plflt, 1.0_plflt, -1.0_plflt, -1.0_plflt/ + data xx2 / -1.0_plflt, 1.0_plflt, 1.0_plflt, -1.0_plflt, -1.0_plflt/ + data yy1 /1.0_plflt, 1.0_plflt, 0.0_plflt, 0.0_plflt, 1.0_plflt/ + data yy2 / -1.0_plflt, -1.0_plflt, 0.0_plflt, 0.0_plflt, -1.0_plflt/ + data zz1 / 0.0_plflt, 0.0_plflt, 1.0_plflt, 1.0_plflt, 0.0_plflt/ + data zz2 / 0.0_plflt, 0.0_plflt, 1.0_plflt, 1.0_plflt, 0.0_plflt/ + + call pladv(0) + call plvpor(0.1_plflt, 0.9_plflt, 0.1_plflt, 0.9_plflt) + call plwind(-1.0_plflt, 1.0_plflt, -1.0_plflt, 1.0_plflt) + call plw3d(1._plflt, 1._plflt, 1._plflt, -1.0_plflt, 1.0_plflt, & + -1.0_plflt, 1.0_plflt, 0.0_plflt,1.5_plflt, 30._plflt, -40._plflt) + +! Plot using identity transform + + call plcol0(1) + call plbox3("bntu", "X", 0.0_plflt, 0, "bntu", "Y", 0.0_plflt, 0, & + "bcdfntu", "Z", 0.5_plflt, 0) + call plcol0(2) + call pllab("","","3-d polygon filling") + + call plcol0(3) + call plpsty(1) + call plline3(xx1, yy1, zz1) + call plfill3(xx1(1:4), yy1(1:4), zz1(1:4)) + call plpsty(2) + call plline3(xx2, yy2, zz2) + call plfill3(xx2(1:4), yy2(1:4), zz2(1:4)) + + end + !---------------------------------------------------------------------------- ! Subroutine a2mnmx ! Minimum and the maximum elements of a 2-d array. Modified: trunk/examples/f95/x29f.f90 =================================================================== --- trunk/examples/f95/x29f.f90 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/examples/f95/x29f.f90 2008-12-16 14:13:49 UTC (rev 9134) @@ -26,12 +26,15 @@ implicit none - real(kind=plflt), dimension(365) :: x, y - common /plotdat/ x, y + real(kind=plflt), dimension(365) :: x, y, xerr1, xerr2, yerr1, yerr2 + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 call plparseopts(PL_PARSE_FULL) call plinit() + +! This is the ASCII value for character @ + call plsesc(64) call plot1() call plot2() @@ -48,13 +51,13 @@ use plplot, PI => PL_PI implicit none - real(kind=plflt), dimension(365) :: x, y - common /plotdat/ x, y + real(kind=plflt), dimension(365) :: x, y, xerr1, xerr2, yerr1, yerr2 + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 integer :: i, npts real(kind=plflt) :: xmin, xmax, ymin, ymax - parameter(npts = 145) + parameter(npts = 73) parameter(xmin = 0.0_plflt) parameter(xmax = 60.0_plflt*60.0_plflt*24.0_plflt) parameter(ymin = 10.0_plflt) @@ -63,9 +66,21 @@ do i = 1,npts x(i) = xmax*(dble(i-1)/dble(npts)) y(i) = 15.0_plflt - 5.0_plflt*cos(2.0_plflt*PI*dble(i-1)/dble(npts)) +! Set x error bars to +/- 5 minute + xerr1(i) = x(i)-60.0_plflt*5.0_plflt + xerr2(i) = x(i)+60.0_plflt*5.0_plflt +! Set y error bars to +/- 0.1 deg C + yerr1(i) = y(i)-0.1_plflt + yerr2(i) = y(i)+0.1_plflt enddo call pladv(0) + +! Rescale major ticks marks by 0.5 + call plsmaj(0.0_plflt,0.5_plflt) +! Rescale minor ticks and error bar marks by 0.5 + call plsmin(0.0_plflt,0.5_plflt) + call plvsta() call plwind(xmin, xmax, ymin, ymax) @@ -78,11 +93,19 @@ call plcol0(3) call pllab("Time (hours:mins)", "Temperature (degC)", & - "#frPLplot Example 29 - Daily temperature") + "@frPLplot Example 29 - Daily temperature") call plcol0(4) call plline(x(1:npts), y(1:npts)) + call plcol0(2) + call plerrx(xerr1(1:npts), xerr2(1:npts), y(1:npts)) + call plcol0(3) + call plerry(x(1:npts), yerr1(1:npts), yerr2(1:npts)) + +! Rescale major / minor tick marks back to default + call plsmin(0.0_plflt,1.0_plflt) + call plsmaj(0.0_plflt,1.0_plflt) end subroutine plot1 @@ -97,8 +120,8 @@ integer :: j, npts real(kind=plflt) :: xmin, xmax, ymin, ymax real(kind=plflt) :: lat, p, d - real(kind=plflt), dimension(365) :: x, y - common /plotdat/ x, y + real(kind=plflt), dimension(365) :: x, y, xerr1, xerr2, yerr1, yerr2 + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 ! Latitude for London @@ -128,16 +151,19 @@ call plcol0(1) ! Set time format to be abbreviated month name followed by day of month call pltimefmt("%b %d") + call plprec(1,1) call plenv(xmin, xmax, ymin, ymax, 0, 40) call plcol0(3) call pllab("Date", "Hours of daylight", & - "#frPLplot Example 29 - Hours of daylight at 51.5N") + "@frPLplot Example 29 - Hours of daylight at 51.5N") call plcol0(4) call plline(x, y) + call plprec(0,0) + end subroutine plot2 ! @@ -151,8 +177,8 @@ real(kind=plflt) :: xmin, xmax, ymin, ymax integer :: tstart, t1, t2 ! real(kind=plflt) :: toff; - real(kind=plflt), dimension(365) :: x, y - common /plotdat/ x, y + real(kind=plflt), dimension(365) :: x, y, xerr1, xerr2, yerr1, yerr2 + common /plotdat/ x, y, xerr1, xerr2, yerr1, yerr2 ! integer tm(9) @@ -189,11 +215,12 @@ call plcol0(3) call pllab("Date", "Hours of television watched", & - "#frPLplot Example 29 - Hours of television watched in " // & + "@frPLplot Example 29 - Hours of television watched in " // & "Dec 2005 / Jan 2006"); call plcol0(4) + call plssym(0.0_plflt, 0.5_plflt) call plpoin(x(1:npts), y(1:npts), 2) call plline(x(1:npts), y(1:npts)) Modified: trunk/plplot_test/test_f77.sh.in =================================================================== --- trunk/plplot_test/test_f77.sh.in 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/plplot_test/test_f77.sh.in 2008-12-16 14:13:49 UTC (rev 9134) @@ -55,7 +55,7 @@ # Do the standard non-interactive examples. # skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}f" fi @@ -100,7 +100,7 @@ # Do the standard non-interactive examples. # skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}f" fi Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2008-12-16 14:12:45 UTC (rev 9133) +++ trunk/plplot_test/test_f95.sh.in 2008-12-16 14:13:49 UTC (rev 9134) @@ -56,7 +56,7 @@ # Do the standard non-interactive examples. # skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi @@ -101,7 +101,7 @@ # Do the standard non-interactive examples. # skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-16 14:53:29
|
Revision: 9135 http://plplot.svn.sourceforge.net/plplot/?rev=9135&view=rev Author: andrewross Date: 2008-12-16 14:53:20 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Update java example to reflect recent changes to C examples, including the implementation of example 31. Modified Paths: -------------- trunk/examples/java/CMakeLists.txt trunk/examples/java/x01.java trunk/examples/java/x03.java trunk/examples/java/x09.java trunk/examples/java/x13.java trunk/examples/java/x15.java trunk/examples/java/x29.java trunk/plplot_test/test_java.sh.in Modified: trunk/examples/java/CMakeLists.txt =================================================================== --- trunk/examples/java/CMakeLists.txt 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/CMakeLists.txt 2008-12-16 14:53:20 UTC (rev 9135) @@ -49,6 +49,7 @@ "28" "29" "30" +"31" ) # This information is duplicated from bindings/java/CMakeLists.txt Modified: trunk/examples/java/x01.java =================================================================== --- trunk/examples/java/x01.java 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/x01.java 2008-12-16 14:53:20 UTC (rev 9135) @@ -56,10 +56,7 @@ { // plplot initialization - // Divide page into 2x2 plots unless user overrides. - pls.ssub(2, 2); - // Parse and process command line arguments. // plMergeOpts(options, "x01c options", notes); @@ -73,7 +70,8 @@ System.out.println("PLplot library version: " + version); // Initialize PLplot. - pls.init(); + // Divide page into 2x2 plots unless user overrides. + pls.star(2,2); // Select the multi-stroke font. if (fontset == 1) Modified: trunk/examples/java/x03.java =================================================================== --- trunk/examples/java/x03.java 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/x03.java 2008-12-16 14:53:20 UTC (rev 9135) @@ -65,6 +65,10 @@ pls.parseopts( args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM ); + // Set orientation to landscape - note not all device drivers + // support this, in particular most interactive drivers do not. + pls.sori(1); + // Initialize plplot. pls.init(); Modified: trunk/examples/java/x09.java =================================================================== --- trunk/examples/java/x09.java 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/x09.java 2008-12-16 14:53:20 UTC (rev 9135) @@ -145,6 +145,7 @@ pls.col0(1); pls.lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); */ + pls.setcontlabelformat(4,3); pls.setcontlabelparam(0.006, 0.3, 0.1, 1); pls.env(-1.0, 1.0, -1.0, 1.0, 0, 0); pls.col0(2); Modified: trunk/examples/java/x13.java =================================================================== --- trunk/examples/java/x13.java 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/x13.java 2008-12-16 14:53:20 UTC (rev 9135) @@ -56,7 +56,12 @@ pls.init(); - pls.env(0., 10., 0., 10., 1, -2); + pls.adv(0); + // Ensure window has aspect ratio of one so circle is + // plotted as a circle. + pls.vasp(1.0); + pls.wind(0., 10., 0., 10.); + //pls.env(0., 10., 0., 10., 1, -2); pls.col0(2); // n.b. all theta quantities scaled by 2*pi/500 to be integers to avoid // floating point logic problems. Modified: trunk/examples/java/x15.java =================================================================== --- trunk/examples/java/x15.java 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/x15.java 2008-12-16 14:53:20 UTC (rev 9135) @@ -115,6 +115,7 @@ plot1( xg0, yg0, z, zmin, zmax ); plot2( xg0, yg0, z, zmin, zmax ); + plot3(); pls.end(); } @@ -165,6 +166,13 @@ int sh_cmap = 0, sh_width; int min_color = 0, min_width = 0, max_color = 0, max_width = 0; int i; + int[] nlin = {1, 1, 1, 1, 1, 2, 2, 2, 2, 2}; + int[][] inc = { {450}, {-450}, {0}, {900}, {300}, + {450,-450}, {0, 900}, {0, 450}, + {450, -450}, {0, 900} }; + int[][] del = { {2000}, {2000}, {2000},{2000}, {2000}, + {2000, 2000}, {2000, 2000}, {2000, 2000}, + {4000, 4000}, {4000, 2000} }; sh_width = 2; pls.adv(0); @@ -177,7 +185,7 @@ shade_min = zmin + (zmax - zmin) * i / 10.0; shade_max = zmin + (zmax - zmin) * (i +1) / 10.0; sh_color = i+6; - pls.psty((i + 2) % 8 + 1); + pls.pat(inc[i],del[i]); pls.shade( z, -1., 1., -1., 1., shade_min, shade_max, @@ -192,6 +200,41 @@ pls.lab("distance", "altitude", "Bogon flux"); } +// Illustrates shaded regions in 3d, using a different fill pattern for +// each region. + + void plot3() + { + double[][] xx = { {-1.0, 1.0, 1.0, -1.0, -1.0}, + {-1.0, 1.0, 1.0, -1.0, -1.0} }; + double[][] yy = { {1.0, 1.0, 0.0, 0.0, 1.0}, + {-1.0, -1.0, 0.0, 0.0, -1.0} }; + double[][] zz = { {0.0, 0.0, 1.0, 1.0, 0.0}, + {0.0, 0.0, 1.0, 1.0, 0.0} }; + + pls.adv(0); + pls.vpor(0.1, 0.9, 0.1, 0.9); + pls.wind(-1.0, 1.0, -1.0, 1.0); + pls.w3d(1., 1., 1., -1.0, 1.0, -1.0, 1.0, 0.0, 1.5, 30, -40); + + // Plot using identity transform + + pls.col0(1); + pls.box3("bntu", "X", 0.0, 0, "bntu", "Y", 0.0, 0, "bcdfntu", "Z", 0.5, 0); + pls.col0(2); + pls.lab("","","3-d polygon filling"); + + pls.col0(3); + pls.psty(1); + pls.line3(xx[0], yy[0], zz[0]); + pls.fill3(xx[0], yy[0], zz[0]); + pls.psty(2); + pls.line3(xx[1], yy[1], zz[1]); + pls.fill3(xx[1], yy[1], zz[1]); + + } + + } //---------------------------------------------------------------------------// Modified: trunk/examples/java/x29.java =================================================================== --- trunk/examples/java/x29.java 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/examples/java/x29.java 2008-12-16 14:53:20 UTC (rev 9135) @@ -57,6 +57,8 @@ // Initialize plplot pls.init(); + pls.sesc('@'); + plot1(); plot2(); @@ -72,13 +74,17 @@ { int i, npts; double xmin, xmax, ymin, ymax; - double x[], y[]; + double x[], y[], xerr1[], xerr2[], yerr1[], yerr2[]; // Data points every 10 minutes for 1 day - npts = 145; + npts = 73; x = new double[npts]; y = new double[npts]; + xerr1 = new double[npts]; + xerr2 = new double[npts]; + yerr1 = new double[npts]; + yerr2 = new double[npts]; xmin = 0; xmax = 60.0*60.0*24.0; // Number of seconds in a day @@ -88,10 +94,21 @@ for (i=0;i<npts;i++) { x[i] = xmax*((double) i/(double)npts); y[i] = 15.0 - 5.0*Math.cos( 2*Math.PI*((double) i / (double) npts)); + // Set x error bars to +/- 5 minute + xerr1[i] = x[i]-60*5; + xerr2[i] = x[i]+60*5; + // Set y error bars to +/- 0.1 deg C + yerr1[i] = y[i]-0.1; + yerr2[i] = y[i]+0.1; } pls.adv(0); + // Rescale major ticks marks by 0.5 + pls.smaj(0.0,0.5); + // Rescale minor ticks and error bar marks by 0.5 + pls.smin(0.0,0.5); + pls.vsta(); pls.wind(xmin, xmax, ymin, ymax); @@ -102,11 +119,20 @@ pls.box("bcnstd", 3.0*60*60, 3, "bcnstv", 1, 5); pls.col0(3); - pls.lab("Time (hours:mins)", "Temperature (degC)", "#frPLplot Example 29 - Daily temperature"); + pls.lab("Time (hours:mins)", "Temperature (degC)", "@frPLplot Example 29 - Daily temperature"); pls.col0(4); pls.line(x, y); + pls.col0(2); + pls.errx(xerr1, xerr2, y); + pls.col0(3); + pls.erry(x, yerr1, yerr2); + + // Rescale major / minor tick marks back to default + pls.smin(0.0,1.0); + pls.smaj(0.0,1.0); + } // Plot the number of hours of daylight as a function of day for a year @@ -145,16 +171,18 @@ pls.col0(1); // Set time format to be abbreviated month name followed by day of month pls.timefmt("%b %d"); + pls.prec(1,1); pls.env(xmin, xmax, ymin, ymax, 0, 40); pls.col0(3); - pls.lab("Date", "Hours of daylight", "#frPLplot Example 29 - Hours of daylight at 51.5N"); + pls.lab("Date", "Hours of daylight", "@frPLplot Example 29 - Hours of daylight at 51.5N"); pls.col0(4); pls.line(x, y); + pls.prec(0,0); } void plot3() @@ -199,10 +227,11 @@ pls.box("bcnstd", 14*24.0*60.0*60.0,14, "bcnstv", 1, 4); pls.col0(3); - pls.lab("Date", "Hours of television watched", "#frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); + pls.lab("Date", "Hours of television watched", "@frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); pls.col0(4); - + + pls.ssym(0.0,0.5); pls.poin(x, y, 2); pls.line(x, y); Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2008-12-16 14:13:49 UTC (rev 9134) +++ trunk/plplot_test/test_java.sh.in 2008-12-16 14:53:20 UTC (rev 9135) @@ -43,7 +43,7 @@ PLPLOT_CLASSPATH=@JAVADATA_HARDDIR@/plplot.jar fi -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}j" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-16 17:47:50
|
Revision: 9138 http://plplot.svn.sourceforge.net/plplot/?rev=9138&view=rev Author: airwin Date: 2008-12-16 17:47:44 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Remove example 31 from the f95 lists until it is implemented. Modified Paths: -------------- trunk/examples/f95/CMakeLists.txt trunk/plplot_test/test_f95.sh.in Modified: trunk/examples/f95/CMakeLists.txt =================================================================== --- trunk/examples/f95/CMakeLists.txt 2008-12-16 15:53:35 UTC (rev 9137) +++ trunk/examples/f95/CMakeLists.txt 2008-12-16 17:47:44 UTC (rev 9138) @@ -52,7 +52,6 @@ "28" "29" "30" -"31" ) # Process fortran header file to define isnan Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2008-12-16 15:53:35 UTC (rev 9137) +++ trunk/plplot_test/test_f95.sh.in 2008-12-16 17:47:44 UTC (rev 9138) @@ -56,7 +56,7 @@ # Do the standard non-interactive examples. # skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30; do if [ "$verbose_test" ]; then echo "x${index}f" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-16 17:59:02
|
Revision: 9140 http://plplot.svn.sourceforge.net/plplot/?rev=9140&view=rev Author: andrewross Date: 2008-12-16 17:58:58 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Re-enable f95 example 31 now it has been committed. Modified Paths: -------------- trunk/examples/f95/CMakeLists.txt trunk/plplot_test/test_f95.sh.in Modified: trunk/examples/f95/CMakeLists.txt =================================================================== --- trunk/examples/f95/CMakeLists.txt 2008-12-16 17:48:45 UTC (rev 9139) +++ trunk/examples/f95/CMakeLists.txt 2008-12-16 17:58:58 UTC (rev 9140) @@ -52,6 +52,7 @@ "28" "29" "30" +"31" ) # Process fortran header file to define isnan Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2008-12-16 17:48:45 UTC (rev 9139) +++ trunk/plplot_test/test_f95.sh.in 2008-12-16 17:58:58 UTC (rev 9140) @@ -56,7 +56,7 @@ # Do the standard non-interactive examples. # skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30; do + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-16 18:06:10
|
Revision: 9141 http://plplot.svn.sourceforge.net/plplot/?rev=9141&view=rev Author: andrewross Date: 2008-12-16 18:06:07 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Add ocaml version of example 31 for Hezekiah M Carty. Modified Paths: -------------- trunk/examples/ocaml/CMakeLists.txt trunk/plplot_test/test_ocaml.sh.in Added Paths: ----------- trunk/examples/ocaml/x31.ml Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2008-12-16 17:58:58 UTC (rev 9140) +++ trunk/examples/ocaml/CMakeLists.txt 2008-12-16 18:06:07 UTC (rev 9141) @@ -49,6 +49,7 @@ "28" "29" "30" + "31" ) set(ocaml_SRCS) Added: trunk/examples/ocaml/x31.ml =================================================================== --- trunk/examples/ocaml/x31.ml (rev 0) +++ trunk/examples/ocaml/x31.ml 2008-12-16 18:06:07 UTC (rev 9141) @@ -0,0 +1,169 @@ +(* $Id$ + + set/get tester +*) + +open Plplot +open Printf + +(*--------------------------------------------------------------------------*\ + * Demonstrates absolute positioning of graphs on a page. + \*--------------------------------------------------------------------------*) + +let main () = + let r1 = [|0; 255|] in + let g1 = [|255; 0|] in + let b1 = [|0; 0|] in + let a1 = [|1.0; 1.0|] in + + (* Parse and process command line arguments *) + ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + + (* Test setting / getting page size *) + let xp, yp, xleng, yleng, xoff, yoff = plgpage () in + let xp2 = xp *. 0.9 in + let yp2 = yp *. 0.9 in + let xleng2 = int_of_float (float_of_int xleng *. 0.9) in + let yleng2 = int_of_float (float_of_int yleng *. 0.9) in + plspage xp2 yp2 xleng2 yleng2 xoff yoff; + let xp, yp, xleng, yleng, xoff, yoff = plgpage () in + if xp <> xp2 || yp <> yp2 || xleng <> xleng2 || yleng <> yleng2 then ( + failwith "plgpage test failed\n"; + ); + + plscompression 1; + let compression = plgcompression () in + if (compression <> 1) then ( + failwith "plgcompression test failed\n" + ); + + let fam, num, bmax = plgfam () in + plsfam 1 1 100000; + let fam1, num1, bmax1 = plgfam () in + if fam1 <> 1 || num1 <> 1 || bmax1 <> 100000 then ( + failwith "plgfam test failed\n"; + ); + plsfam fam num bmax; + + (* Initialize plplot *) + plinit (); + + plscolor 1; + + plscol0 1 255 0 0; + + plscmap1 r1 g1 b1; + plscmap1a r1 g1 b1 a1; + + let level = plglevel () in + if level <> 1 then ( + let err = + sprintf "plglevel test failed. Level is %d, but 1 expected.\n" level + in + failwith err; + ); + + pladv 0; + plvpor 0.0 1.0 0.0 1.0; + + plwind 0.2 0.3 0.4 0.5; + let xmin, xmax, ymin, ymax = plgvpw () in + if xmin <> 0.2 || xmax <> 0.3 || ymin <> 0.4 || ymax <> 0.5 then ( + failwith "plgvpw test failed\n"; + ); + + let xmin, xmax, ymin, ymax = plgvpd () in + if xmin <> 0.0 || xmax <> 1.0 || ymin <> 0.0 || ymax <> 1.0 then ( + failwith "plgvpd test failed\n"; + ); + + (* Get world coordinates for 0.5,0.5 which is in the middle of + the window *) + let wx, wy, win = plcalc_world 0.5 0.5 in + if abs_float (wx -. 0.25) > 1.0E-5 || abs_float (wy -. 0.45) > 1.0E-5 then ( + failwith "plcalc_world test failed\n"; + ); + + (* Retrieve and print the name of the output file (if any) *) + let fnam = plgfnam () in + printf "Output file name is %s\n" fnam; + + (* Set and get the number of digits used to display axis labels *) + (* Note digits is currently ignored in pls[xyz]ax and + therefore it does not make sense to test the returned + value *) + plsxax 3 0; + let digmax, _ = plgxax () in + if digmax <> 3 then ( + failwith "plgxax test failed\n"; + ); + + plsyax 3 0; + let digmax, _ = plgyax () in + if digmax <> 3 then ( + failwith "plgyax test failed\n"; + ); + + plszax 3 0; + let digmax, _ = plgzax () in + if digmax <> 3 then ( + failwith "plgzax test failed\n"; + ); + + (* TODO: Add PL_NOTSET definition to the OCaml bindings? *) + plsdidev 0.05 (-42.0) 0.0 0.0; + let mar, aspect, jx, jy = plgdidev () in + if mar <> 0.05 || jx <> 0.0 || jy <> 0.0 then ( + failwith "plgdidev test failed\n"; + ); + + plsdiori 1.0; + let ori = plgdiori () in + if ori <> 1.0 then ( + failwith "plgdiori test failed\n"; + ); + + plsdiplt 0.1 0.1 0.9 0.9; + let xmin, ymin, xmax, ymax = plgdiplt () in + if xmin <> 0.1 || xmax <> 0.9 || ymin <> 0.1 || ymax <> 0.9 then ( + failwith "plgdiplt test failed\n"; + ); + + plsdiplz 0.1 0.1 0.9 0.9; + let xmin, ymin, xmax, ymax = plgdiplt () in + if + xmin <> 0.1 +. 0.8 *. 0.1 || + xmax <> 0.1 +. 0.8 *. 0.9 || + ymin <> 0.1 +. 0.8 *. 0.1 || + ymax <> 0.1 +. 0.8 *. 0.9 + then ( + failwith "plsdiplz test failed\n"; + ); + + plscolbg 0 0 0; + let r, g, b = plgcolbg () in + if r <> 0 || g <> 0 || b <> 0 then ( + failwith "plgcolbg test failed\n"; + ); + + plscolbga 0 0 0 1.0; + let r, g, b, a = plgcolbga () in + if r <> 0 || g <> 0 || b <> 0 || a <> 1.0 then ( + failwith "plgcolbga test failed\n"; + ); + + () + +let () = + let () = + try + main () + with + | Failure err -> + prerr_string err; + plend (); + exit 1; + () + in + plend (); + () Property changes on: trunk/examples/ocaml/x31.ml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_ocaml.sh.in =================================================================== --- trunk/plplot_test/test_ocaml.sh.in 2008-12-16 17:58:58 UTC (rev 9140) +++ trunk/plplot_test/test_ocaml.sh.in 2008-12-16 18:06:07 UTC (rev 9141) @@ -23,7 +23,7 @@ # $options, and possibly $verbose_test defined. # Do the standard non-interactive examples. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}ocaml" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-16 22:55:25
|
Revision: 9152 http://plplot.svn.sourceforge.net/plplot/?rev=9152&view=rev Author: airwin Date: 2008-12-16 21:30:00 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Initial commit of example 31 for python. x31 implements the pre-plinit tests and is completed. xw31.py just makes the plot and does none of the post-plinit tests yet which I will soon be implementing. Modified Paths: -------------- trunk/examples/python/CMakeLists.txt trunk/plplot_test/test_python.sh.in Added Paths: ----------- trunk/examples/python/x31 trunk/examples/python/xw31.py Modified: trunk/examples/python/CMakeLists.txt =================================================================== --- trunk/examples/python/CMakeLists.txt 2008-12-16 20:28:20 UTC (rev 9151) +++ trunk/examples/python/CMakeLists.txt 2008-12-16 21:30:00 UTC (rev 9152) @@ -48,6 +48,7 @@ "28" "29" "30" +"31" ) set(python_SCRIPTS) Added: trunk/examples/python/x31 =================================================================== --- trunk/examples/python/x31 (rev 0) +++ trunk/examples/python/x31 2008-12-16 21:30:00 UTC (rev 9152) @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +# Copyright (C) 2004 Alan W. Irwin +# Copyright (C) 2004 Andrew Ross +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with the file PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +# Run all python plplot examples non-interactively. + +# Append to effective python path so that can find plplot modules. +from plplot_python_start import * + +import sys +from plplot import * + +# Parse and process command line arguments +plparseopts(sys.argv, PL_PARSE_FULL) + +# Test setting / getting page size. +(xp, yp, xleng, yleng, xoff, yoff) = plgpage() +xp2 = xp*0.9 +yp2 = yp*0.9 +xleng2 = int(xleng*0.9) +yleng2 = int(yleng*0.9) +plspage(xp2, yp2, xleng2, yleng2, xoff, yoff) +(xp, yp, xleng, yleng, xoff, yoff) = plgpage() +if xp != xp2*1.1 || yp != yp2 || xleng != xleng2 || yleng != yleng2: + sys.stderr.write("plgpage test failed\n") + plend() + sys.exit(1) + + +# Initialize plplot +plinit() + +import xw31 + +# Terminate plplot +plend() + Property changes on: trunk/examples/python/x31 ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/examples/python/xw31.py =================================================================== --- trunk/examples/python/xw31.py (rev 0) +++ trunk/examples/python/xw31.py 2008-12-16 21:30:00 UTC (rev 9152) @@ -0,0 +1,40 @@ +# $Id$ + +# Copyright (C) 2008 Alan W. Irwin + +# Set/get tester. +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Library Public License as published +# by the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +from plplot_py_demos import * + +def main(): + + pladv(0) + plvpor(0.0, 1.0, 0.0, 1.0) + plwind(0.0, 1.0, 0.0, 1.0) + plbox("bc", 0.0, 0, "bc", 0.0, 0) + + plsvpa(50.0, 150.0, 50.0, 100.0) + plwind(0.0, 1.0, 0.0, 1.0) + plbox("bc", 0.0, 0, "bc", 0.0, 0) + plptex(0.5, 0.5, 1.0, 0.0, 0.5, "BOX at (50,150,50,100)") + + # Restore defaults + #plcol0(1) + +main() Property changes on: trunk/examples/python/xw31.py ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2008-12-16 20:28:20 UTC (rev 9151) +++ trunk/plplot_test/test_python.sh.in 2008-12-16 21:30:00 UTC (rev 9152) @@ -32,7 +32,7 @@ # Skip 21 if using Numeric - it doesn't work # For 24 you need special fonts installed to get good result. for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 \ -20 22 23 24 25 26 27 28 29 30 @NUMPY_EXAMPLES@ ; do +20 22 23 24 25 26 27 28 29 30 31 @NUMPY_EXAMPLES@ ; do if [ "$verbose_test" ]; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-16 23:22:32
|
Revision: 9153 http://plplot.svn.sourceforge.net/plplot/?rev=9153&view=rev Author: andrewross Date: 2008-12-16 21:38:15 +0000 (Tue, 16 Dec 2008) Log Message: ----------- Implement example 31 in octave. Modified Paths: -------------- trunk/bindings/octave/demos/CMakeLists.txt trunk/plplot_test/test_octave.sh.in Added Paths: ----------- trunk/bindings/octave/demos/x31c.m Modified: trunk/bindings/octave/demos/CMakeLists.txt =================================================================== --- trunk/bindings/octave/demos/CMakeLists.txt 2008-12-16 21:30:00 UTC (rev 9152) +++ trunk/bindings/octave/demos/CMakeLists.txt 2008-12-16 21:38:15 UTC (rev 9153) @@ -73,6 +73,7 @@ x28c.m x29c.m x30c.m +x31c.m lena.img ) Added: trunk/bindings/octave/demos/x31c.m =================================================================== --- trunk/bindings/octave/demos/x31c.m (rev 0) +++ trunk/bindings/octave/demos/x31c.m 2008-12-16 21:38:15 UTC (rev 9153) @@ -0,0 +1,210 @@ +## $Id$ +## +## Copyright (C) 2008 Alan W. Irwin +## Copyright (C) 2008 Andrew Ross +## +## set/get tester +## +## This file is part of PLplot. +## +## PLplot is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Library Public License as published +## by the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## PLplot is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Library General Public License for more details. +## +## You should have received a copy of the GNU Library General Public License +## along with PLplot; if not, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +## + +1; + +function ret = ix31c + + if (!exist("plinit")) + plplot_stub + endif + + if(isempty(sprintf("%s",plgdev'))) + plsdev("xwin"); + endif + + PL_NOTSET = -42.0; + + r1 = [0, 255]; + g1 = [255, 0]; + b1 = [0, 0]; + a1 = [1.0, 1.0]; + + ## Parse and process command line arguments + + ## (void) plparseopts(&argc, argv, PL_PARSE_FULL); + + ## Test setting / getting page size + [xp, yp, xleng, yleng, xoff, yoff] = plgpage(); + xp2 = xp*0.9; + yp2 = yp*0.9; + xleng2 = floor(xleng*0.9); + yleng2 = floor(yleng*0.9); + plspage(xp2, yp2, xleng2, yleng2, xoff, yoff); + [xp, yp, xleng, yleng, xoff, yoff] = plgpage(); + if (xp != xp2 || yp != yp2 || xleng != xleng2 || yleng != yleng2) + fputs("plgpage test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plscompression(1); + compression = plgcompression(); + if (compression != 1) + fputs("plgcompression test failed\n",stderr); + plend(); + ret = 1; return; + endif + + [fam, num, bmax] = plgfam(); + plsfam(1,1,100000); + [fam1, num1, bmax1] = plgfam(); + if (fam1 != 1 || num1 != 1 || bmax1 != 100000) + fputs("plgfam test failed\n",stderr); + plend(); + ret = 1; return; + endif + plsfam(fam, num, bmax); + + ## Initialize plplot + + plinit(); + + plscolor(1); + + plscol0(1, 255, 0, 0); + + plscmap1(r1',g1',b1'); + plscmap1a(r1',g1',b1',a1'); + + level = plglevel(); + if (level != 1) + fprintf(stderr,"plglevel test failed. Level is %d, but 1 expected.\n",level); + plend(); + ret = 1; return; + endif + + pladv(0); + plvpor(0.0, 1.0, 0.0, 1.0); + + plwind(0.2, 0.3, 0.4, 0.5); + [xmin, xmax, ymin, ymax] = plgvpw(); + if (xmin != 0.2 || xmax != 0.3 || ymin != 0.4 || ymax != 0.5) + fputs("plgvpw test failed\n",stderr); + plend(); + ret = 1; return; + endif + + [xmin, xmax, ymin, ymax] = plgvpd(); + if (xmin != 0.0 || xmax != 1.0 || ymin != 0.0 || ymax != 1.0) + fputs("plgvpd test failed\n",stderr); + plend(); + ret = 1; return; + endif + + ## Get world coordinates for 0.5,0.5 which is in the middle of + ## the window + [wx,wy,win] = plcalc_world(0.5,0.5); + if (abs(wx-0.25)>1.0E-5 || abs(wy-0.45)>1.0E-5) + fputs("plcalc_world test failed\n",stderr); + plend(); + ret = 1; return; + endif + + ## Retrieve and print the name of the output file (if any) + fnam = plgfnam(); + printf("Output file name is %s\n",fnam); + + ## Set and get the number of digits used to display axis labels + ## Note digits is currently ignored in pls[xyz]ax and + ## therefore it does not make sense to test the returned + ## value. + plsxax(3,0); + [digmax,digits] = plgxax(); + if (digmax != 3) + fputs("plgxax test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plsyax(3,0); + [digmax,digits] = plgyax(); + if (digmax != 3) + fputs("plgyax test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plszax(3,0); + [digmax,digits] = plgzax(); + if (digmax != 3) + fputs("plgzax test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plsdidev(0.05, PL_NOTSET, 0.0, 0.0); + [mar, aspect, jx, jy] = plgdidev(); + if (mar != 0.05 || jx != 0.0 || jy != 0.0) + fputs("plgdidev test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plsdiori(1.0); + ori = plgdiori(); + if (ori != 1.0) + fputs("plgdiori test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plsdiplt(0.1, 0.1, 0.9, 0.9); + [xmin, ymin, xmax, ymax] = plgdiplt(); + if (xmin != 0.1 || xmax != 0.9 || ymin != 0.1 || ymax != 0.9) + fputs("plgdiplt test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plsdiplz(0.1, 0.1, 0.9, 0.9); + [xmin, ymin, xmax, ymax] = plgdiplt(); + if (xmin != 0.1+0.8*0.1 || xmax != 0.1+0.8*0.9 || ymin != 0.1+0.8*0.1 || ymax != 0.1+0.8*0.9) + fputs("plsdiplz test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plscolbg(0,0,0); + [r, g, b] = plgcolbg(); + if (r != 0 || g != 0 || b != 0) + fputs("plgcolbg test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plscolbga(0,0,0,1.0); + [r, g, b, a] = plgcolbga(); + if (r != 0 || g != 0 || b != 0 || a != 1.0) + fputs("plgcolbga test failed\n",stderr); + plend(); + ret = 1; return; + endif + + plend(); + ret = 0; + +endfunction + +ix31c Property changes on: trunk/bindings/octave/demos/x31c.m ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2008-12-16 21:30:00 UTC (rev 9152) +++ trunk/plplot_test/test_octave.sh.in 2008-12-16 21:38:15 UTC (rev 9153) @@ -72,7 +72,7 @@ #(and should probably be dropped anyway since the map stuff is not #in the API that is supposed to be common to all front ends.) failed = []; -for i=[1:13 15 16 18 20:30 ]; +for i=[1:13 15 16 18 20:31 ]; cmd = sprintf("x%.2dc",i); if (verbose_test) printf("%s\n",cmd); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-17 15:35:50
|
Revision: 9164 http://plplot.svn.sourceforge.net/plplot/?rev=9164&view=rev Author: andrewross Date: 2008-12-17 15:35:45 +0000 (Wed, 17 Dec 2008) Log Message: ----------- Update test scripts to pipe stdout to a file as well as to the screen. Update compare test to check that output is the same as the C versions of the examples. Particularly useful for testing the output from example 31. This commit also fixes a bug in test_java.sh.in with = used instead of == for a bash string comparison. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/plplot_test/test_ada.sh.in trunk/plplot_test/test_c.sh.in trunk/plplot_test/test_cxx.sh.in trunk/plplot_test/test_diff.sh.in trunk/plplot_test/test_f77.sh.in trunk/plplot_test/test_f95.sh.in trunk/plplot_test/test_java.sh.in trunk/plplot_test/test_ocaml.sh.in trunk/plplot_test/test_octave.sh.in trunk/plplot_test/test_perl.sh.in trunk/plplot_test/test_python.sh.in trunk/plplot_test/test_tcl.sh.in Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/cmake/modules/plplot.cmake 2008-12-17 15:35:45 UTC (rev 9164) @@ -73,11 +73,18 @@ ) endif(NOT SH_EXECUTABLE) -# Find diff and tail which are used to compare results from different +# Find diff, tail and tee which are used to compare results from different # bindings. find_program(DIFF_EXECUTABLE diff) find_program(TAIL_EXECUTABLE tail) +find_program(TEE_EXECUTABLE tee) +if(TEE_EXECUTABLE) + set(TEE_CMD "| ${TEE_EXECUTABLE} ") +else(TEE_EXECUTABLE) + set(TEE_CMD "> ") +endif(TEE_EXECUTABLE) + option(PREBUILD_DIST "Pre-build all components required for distribution" OFF) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") set( Modified: trunk/plplot_test/test_ada.sh.in =================================================================== --- trunk/plplot_test/test_ada.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_ada.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -29,6 +29,7 @@ # Do the standard non-interactive examples. # Skip 14 because it requires two output files. # Skip 17 because it is interactive. +lang="a" for index in \ 01 02 03 04 05 06 07 08 09 \ 10 11 12 13 15 16 18 19 20 \ @@ -37,9 +38,9 @@ thick10 thick11 thick12 thick13 thick15 thick16 thick18 thick19 thick20 \ thick21 thick22 thick23 thick24 thick25 thick26 thick27 thick28 thick29 thick30; do if [ "$verbose_test" ]; then - echo "x${index}a" + echo "x${index}" fi - $adadir/x${index}a -dev $device -o ${OUTPUT_DIR}/x${index}a%n.$dsuffix $options 2> test.error + $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_c.sh.in =================================================================== --- trunk/plplot_test/test_c.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_c.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -37,7 +37,7 @@ echo "x${index}${lang}" fi $DEBUG_CMD $cdir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ - $options 2> test.error + $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt # Look for any status codes (segfaults, plexit) from the examples themselves. status_code=$? cat test.error Modified: trunk/plplot_test/test_cxx.sh.in =================================================================== --- trunk/plplot_test/test_cxx.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_cxx.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -42,7 +42,7 @@ if [ "$verbose_test" ]; then echo "x${index}" fi - $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error + $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_diff.sh.in =================================================================== --- trunk/plplot_test/test_diff.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_diff.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -62,6 +62,8 @@ missing="" different="" + diffstdout="" + missingstdout="" # Assume that if example 1 is missing then the language is # not implemented. @@ -84,13 +86,23 @@ if [ $? != 0 ] ; then different="${different} ${index}" fi + if [ -f x${index}${suffix}_psc.txt ] ; then + @DIFF_EXECUTABLE@ -q x${index}c_psc.txt x${index}${suffix}_psc.txt 2>&1 > /dev/null + if [ $? != 0 ] ; then + diffstdout="${diffstdout} ${index}" + fi + else + missingstdout="${missingstdout} ${index}" + fi fi fi done echo "${lang}" - echo " Missing examples : ${missing}" - echo " Differing examples : ${different}" - if [ "${different}" != "" ] ; then + echo " Missing examples : ${missing}" + echo " Differing postscript output : ${different}" + echo " Missing stdout : ${missingstdout}" + echo " Differing stdout : ${diffstdout}" + if [ "${different}" != "" ] || [ ${diffstdout} != "" ] ; then ret=1 fi fi Modified: trunk/plplot_test/test_f77.sh.in =================================================================== --- trunk/plplot_test/test_f77.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_f77.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -59,7 +59,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error + $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then @@ -82,7 +82,7 @@ if [ "$verbose_test" ]; then echo "x16af" fi - $DEBUG_CMD $f77dir/x16af <<EOF 2> test.error + $DEBUG_CMD $f77dir/x16af <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x16af%n.$dsuffix EOF @@ -104,7 +104,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error + $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f%n.$dsuffix EOF Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_f95.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -40,7 +40,7 @@ if [ "$verbose_test" ]; then echo "x16af" fi - $DEBUG_CMD $f95dir/x16af -dev $device -o ${OUTPUT_DIR}/x16af95%n.$dsuffix $options 2> test.error + $DEBUG_CMD $f95dir/x16af -dev $device -o ${OUTPUT_DIR}/x16af95%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then @@ -60,7 +60,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error + $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then @@ -82,7 +82,7 @@ if [ "$verbose_test" ]; then echo "x16af" fi - $DEBUG_CMD $f95dir/x16af <<EOF 2> test.error + $DEBUG_CMD $f95dir/x16af <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x16af95%n.$dsuffix EOF @@ -105,7 +105,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error + $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f95%n.$dsuffix EOF Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_java.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -36,6 +36,7 @@ # skip 17 because it is interactive and not implemented. # # Set up option to point to java bindings jar file and wrapper if needed. +lang="j" if test -n "$PLPLOT_JAVA_WRAP_DIR" ; then JAVA_TEST_OPTS="-Dplplot.libdir=$PLPLOT_JAVA_WRAP_DIR" fi @@ -45,12 +46,12 @@ for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then - echo "x${index}j" + echo "x${index}" fi - if test "@WIN32@" = "1"; then - java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}j%n.$dsuffix $options 2> test.error + if test "@WIN32@" == "1"; then + java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt else - java -classpath ${javadir}:${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}j%n.$dsuffix $options 2> test.error + java -classpath ${javadir}:${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt fi status_code=$? cat test.error Modified: trunk/plplot_test/test_ocaml.sh.in =================================================================== --- trunk/plplot_test/test_ocaml.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_ocaml.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -23,12 +23,13 @@ # $options, and possibly $verbose_test defined. # Do the standard non-interactive examples. +lang="ocaml" for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}ocaml" fi - $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}ocaml%n.$dsuffix \ - $options 2> test.error + $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${ocaml}%n.$dsuffix \ + $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt # Look for any status codes (segfaults, plexit) from the examples themselves. status_code=$? cat test.error Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_octave.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -26,6 +26,8 @@ # The following is only need for the build tree! It should has no effect # when this script is launched from the install tree. +lang="o" +export lang TOPDIR=`pwd`/.. echo $TOPDIR export LD_LIBRARY_PATH=$TOPDIR/src:$TOPDIR/lib/csa:$TOPDIR/lib/nn @@ -88,7 +90,7 @@ plSetOpt("dev", device); #o trailer on filename e.g., x01o.ps) to distinguish from other #common examples. - file = sprintf("${OUTPUT_DIR}/x%.2do%%n.$dsuffix",i); + file = sprintf("${OUTPUT_DIR}/x%.2d${lang}%%n.$dsuffix",i); plSetOpt("o", file); eval(cmd, "failed = [failed, i];"); endfor Modified: trunk/plplot_test/test_perl.sh.in =================================================================== --- trunk/plplot_test/test_perl.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_perl.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -31,6 +31,7 @@ # Ensure correct version of the libraries are picked up in both the build # tree and install tree. +lang="pdl" if [ "$LD_LIBRARY_PATH" == "" ] ; then export LD_LIBRARY_PATH=../src:@LIB_DIR@ else @@ -49,7 +50,7 @@ if [ "$verbose_test" ]; then echo "x${index}.pl" fi - $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}pdl%n.$dsuffix $options 2> test.error + $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_python.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -31,12 +31,13 @@ # Skip 20 because it is not (yet) implemented. # Skip 21 if using Numeric - it doesn't work # For 24 you need special fonts installed to get good result. +lang="p" for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 \ 20 22 23 24 25 26 27 28 29 30 31 @NUMPY_EXAMPLES@ ; do if [ "$verbose_test" ]; then echo "x${index}" fi - @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}p%n.$dsuffix $options 2> test.error + @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_tcl.sh.in =================================================================== --- trunk/plplot_test/test_tcl.sh.in 2008-12-17 13:02:59 UTC (rev 9163) +++ trunk/plplot_test/test_tcl.sh.in 2008-12-17 15:35:45 UTC (rev 9164) @@ -23,7 +23,7 @@ # This is called from plplot-test.sh with $tcldir, $device, $dsuffix, # $options, and possibly $verbose_test defined. - +lang="t" cd $OUTPUT_DIR results=`pwd` export results @@ -79,7 +79,7 @@ if [ "$verbose_test" ]; then echo "x${index}" fi - ./x${index} -dev $device -o $results/x${index}t%n.$dsuffix $options 2> test.error + ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-12-18 08:41:59
|
Revision: 9184 http://plplot.svn.sourceforge.net/plplot/?rev=9184&view=rev Author: smekal Date: 2008-12-18 08:41:56 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Add the wxpng device. Modified Paths: -------------- trunk/config.h.cmake trunk/include/drivers.h trunk/include/plDevs.h.cmake trunk/include/plcore.h Modified: trunk/config.h.cmake =================================================================== --- trunk/config.h.cmake 2008-12-18 08:38:53 UTC (rev 9183) +++ trunk/config.h.cmake 2008-12-18 08:41:56 UTC (rev 9184) @@ -305,6 +305,9 @@ /* Define if wxwidgets driver is present */ #cmakedefine PLD_wxwidgets +/* Define if wxwidgets png driver is present */ +#cmakedefine PLD_wxpng + /* Define if the cairo X windows driver is present */ #cmakedefine PLD_xcairo Modified: trunk/include/drivers.h =================================================================== --- trunk/include/drivers.h 2008-12-18 08:38:53 UTC (rev 9183) +++ trunk/include/drivers.h 2008-12-18 08:41:56 UTC (rev 9184) @@ -87,6 +87,7 @@ PLDLLIMPEXP_DRIVER void plD_dispatch_init_mem ( PLDispatchTable *pdt ); PLDLLIMPEXP_DRIVER void plD_dispatch_init_wingcc ( PLDispatchTable *pdt ); PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxwidgets ( PLDispatchTable *pdt ); +PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxpng ( PLDispatchTable *pdt ); PLDLLIMPEXP_DRIVER void plD_dispatch_init_svg ( PLDispatchTable *pdt ); PLDLLIMPEXP_DRIVER void plD_dispatch_init_pdf ( PLDispatchTable *pdt ); PLDLLIMPEXP_DRIVER void plD_dispatch_init_xcairo ( PLDispatchTable *pdt ); Modified: trunk/include/plDevs.h.cmake =================================================================== --- trunk/include/plDevs.h.cmake 2008-12-18 08:38:53 UTC (rev 9183) +++ trunk/include/plDevs.h.cmake 2008-12-18 08:41:56 UTC (rev 9184) @@ -75,6 +75,7 @@ #cmakedefine PLD_mem #cmakedefine PLD_wingcc #cmakedefine PLD_wxwidgets +#cmakedefine PLD_wxpng #cmakedefine PLD_svg #cmakedefine PLD_pdf #cmakedefine PLD_xcairo Modified: trunk/include/plcore.h =================================================================== --- trunk/include/plcore.h 2008-12-18 08:38:53 UTC (rev 9183) +++ trunk/include/plcore.h 2008-12-18 08:41:56 UTC (rev 9184) @@ -262,6 +262,9 @@ #if defined(PLD_wxwidgets) && !defined(ENABLE_DYNDRIVERS) plD_dispatch_init_wxwidgets, #endif +#if defined(PLD_wxpng) && !defined(ENABLE_DYNDRIVERS) + plD_dispatch_init_wxpng, +#endif #if defined(PLD_svg) && !defined(ENABLE_DYNDRIVERS) plD_dispatch_init_svg, #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-18 09:54:57
|
Revision: 9186 http://plplot.svn.sourceforge.net/plplot/?rev=9186&view=rev Author: andrewross Date: 2008-12-18 09:54:53 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Modify octave examples and test script so ctest can redirect output to a file rather than stdout. Note this is different to the other languages in that it uses octave capabilities rather than tee. This is more intrusive, but does ensure that the examples can all be run from a single octave process which is much more efficient. Modified Paths: -------------- trunk/bindings/octave/demos/x01c.m trunk/bindings/octave/demos/x23c.m trunk/bindings/octave/demos/x31c.m trunk/plplot_test/test_octave.sh.in Modified: trunk/bindings/octave/demos/x01c.m =================================================================== --- trunk/bindings/octave/demos/x01c.m 2008-12-18 08:42:44 UTC (rev 9185) +++ trunk/bindings/octave/demos/x01c.m 2008-12-18 09:54:53 UTC (rev 9186) @@ -17,8 +17,13 @@ 1; -function ix01c +function ix01c(strm) + # Redirect output to file if required + if (nargin == 0) + strm = stdout; + endif + if (!exist("plinit")) plplot_stub endif @@ -37,7 +42,7 @@ ## Get version number, just for kicks */ ver=plgver'; - printf("PLplot library version: %s\n", ver); + fprintf(strm,"PLplot library version: %s\n", ver); ## Initialize plplot */ ## Divide page into 2x2 plots unless user overrides */ @@ -219,6 +224,10 @@ endfunction -ix01c +if (exist("strm","var")) + ix01c(strm) +else + ix01c() +endif Modified: trunk/bindings/octave/demos/x23c.m =================================================================== --- trunk/bindings/octave/demos/x23c.m 2008-12-18 08:42:44 UTC (rev 9185) +++ trunk/bindings/octave/demos/x23c.m 2008-12-18 09:54:53 UTC (rev 9186) @@ -26,8 +26,14 @@ ## Displays Greek letters and mathematically interesting Unicode ranges -function ix23c +function ix23c(strm) + # Redirect output to file if required + if (nargin == 0) + strm = stdout; + endif + + Greek = [\ "#gA";"#gB";"#gG";"#gD";"#gE";"#gZ";"#gY";"#gH";"#gI";"#gK";"#gL";"#gM";\ "#gN";"#gC";"#gO";"#gP";"#gR";"#gS";"#gT";"#gU";"#gF";"#gX";"#gQ";"#gW";\ @@ -270,8 +276,8 @@ ## Demonstrate methods of getting the current fonts fci_old = plgfci(); [ifamily,istyle,iweight] = plgfont(); -printf("For example 23 prior to page 12 the FCI is 0x%x\n",fci_old); -printf("For example 23 prior to page 12 the font family, style and weight are %s %s %s\n",deblank(family(ifamily+1,:)), deblank(style(istyle+1,:)), deblank(weight(iweight+1,:))); +fprintf(ostrm,"For example 23 prior to page 12 the FCI is 0x%x\n",fci_old); +fprintf(ostrm,"For example 23 prior to page 12 the font family, style and weight are %s %s %s\n",deblank(family(ifamily+1,:)), deblank(style(istyle+1,:)), deblank(weight(iweight+1,:))); for page=11:15 dy = 0.030; @@ -321,4 +327,9 @@ end -ix23c +if (exist("strm","var")) + ix23c(strm); +else + ix23c(); +endif + Modified: trunk/bindings/octave/demos/x31c.m =================================================================== --- trunk/bindings/octave/demos/x31c.m 2008-12-18 08:42:44 UTC (rev 9185) +++ trunk/bindings/octave/demos/x31c.m 2008-12-18 09:54:53 UTC (rev 9186) @@ -24,8 +24,13 @@ 1; -function ret = ix31c +function ret = ix31c(strm) + # Redirect output to file if required + if (nargin == 0) + strm = stdout; + endif + if (!exist("plinit")) plplot_stub endif @@ -207,4 +212,8 @@ endfunction -ix31c +if (exist("strm","var")) + ix31c(strm) +else + ix31c() +endif Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2008-12-18 08:42:44 UTC (rev 9185) +++ trunk/plplot_test/test_octave.sh.in 2008-12-18 09:54:53 UTC (rev 9186) @@ -75,6 +75,8 @@ #in the API that is supposed to be common to all front ends.) failed = []; for i=[1:13 15 16 18 20:31 ]; + ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); + strm = fopen(ofile,"w"); cmd = sprintf("x%.2dc",i); if (verbose_test) printf("%s\n",cmd); @@ -93,6 +95,7 @@ file = sprintf("${OUTPUT_DIR}/x%.2d${lang}%%n.$dsuffix",i); plSetOpt("o", file); eval(cmd, "failed = [failed, i];"); + fclose(strm); endfor if ! isempty (failed) printf ("Failed tests: "); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-18 12:52:52
|
Revision: 9190 http://plplot.svn.sourceforge.net/plplot/?rev=9190&view=rev Author: andrewross Date: 2008-12-18 12:52:48 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Some minor tweaks to example 31 so that the example will not exit until the end, even if an error occurs. This ensures that all the get / set tests are run so multiple problems can be identified. Also ensure something (not the file name) is printed out for the plgfnam test so the user can quickly see that it is included. Modified Paths: -------------- trunk/bindings/octave/demos/x31c.m trunk/examples/c/x31c.c trunk/examples/python/xw31.py Modified: trunk/bindings/octave/demos/x31c.m =================================================================== --- trunk/bindings/octave/demos/x31c.m 2008-12-18 12:18:32 UTC (rev 9189) +++ trunk/bindings/octave/demos/x31c.m 2008-12-18 12:52:48 UTC (rev 9190) @@ -79,6 +79,8 @@ ## Test if device initialization screwed around with the preset ## compression parameter. compression2 = plgcompression(); + fprintf(strm,"Output various PLplot parameters\n"); + fprintf(strm,"compression parameter = %d\n", compression2); if (compression2 != compression1) fputs(stderr, "plgcompression test failed\n"); plend(); @@ -148,6 +150,7 @@ ## Get world coordinates for middle of viewport [wx,wy,win] = plcalc_world(xmid,ymid); + fprintf(strm,"world parameters: wx, wy, win = %f %f %d \n", wx, wy, win); if (abs(wx-0.5*(xmin+xmax))>1.0E-5 || abs(wy-0.5*(ymin+ymax))>1.0E-5) fputs(stderr,"plcalc_world test failed\n"); plend(); @@ -159,9 +162,9 @@ ## we want stdout to be identical for compare test. fnam = plgfnam(); if (fnam(1) == "\0") + fputs(strm,"No output file name is set\n"); + else fputs(strm,"Output file name read\n"); - else - fputs(strm,"No output file name is set\n"); endif fprintf(stderr,"Output file name is %s\n",fnam); @@ -208,7 +211,7 @@ plsdiori(1.0); ori = plgdiori(); - printf("ori parameter = %f \n", ori); + fprintf(strm,"ori parameter = %f \n", ori); if (ori != 1.0) fputs(stderr,"plgdiori test failed\n"); plend(); Modified: trunk/examples/c/x31c.c =================================================================== --- trunk/examples/c/x31c.c 2008-12-18 12:18:32 UTC (rev 9189) +++ trunk/examples/c/x31c.c 2008-12-18 12:52:48 UTC (rev 9190) @@ -40,10 +40,13 @@ PLINT g1[] = {255, 0}; PLINT b1[] = {0, 0}; PLFLT a1[] = {1.0, 1.0}; + int status; char fnam[80]; /* Parse and process command line arguments */ + status = 0; + (void) plparseopts(&argc, argv, PL_PARSE_FULL); /* Test setting / getting compression parameter across plinit. */ @@ -76,7 +79,7 @@ if (compression2 != compression1) { fputs("plgcompression test failed\n",stderr); plend(); - exit(1); + status = 1; } /* Test if device initialization screwed around with any of the @@ -86,7 +89,7 @@ if (fam2 != fam1 || num2 != num1 || bmax2 != bmax1) { fputs("plgfam test failed\n",stderr); plend(); - exit(1); + status = 1; } /* Test if device initialization screwed around with any of the @@ -97,7 +100,7 @@ xoff2 != xoff1 || yoff2 != yoff1 ) { fputs("plgpage test failed\n",stderr); plend(); - exit(1); + status = 1; } @@ -113,7 +116,7 @@ if (level2 != 1) { fputs("plglevel test failed.\n",stderr); plend(); - exit(1); + status = 1; } pladv(0); @@ -123,7 +126,7 @@ if (xmin != 0.01 || xmax != 0.99 || ymin != 0.02 || ymax != 0.49) { fputs("plgvpd test failed\n",stderr); plend(); - exit(1); + status = 1; } xmid = 0.5*(xmin+xmax); ymid = 0.5*(ymin+ymax); @@ -134,7 +137,7 @@ if (xmin != 0.2 || xmax != 0.3 || ymin != 0.4 || ymax != 0.5) { fputs("plgvpw test failed\n",stderr); plend(); - exit(1); + status = 1; } /* Get world coordinates for middle of viewport */ @@ -143,13 +146,19 @@ if (fabs(wx-0.5*(xmin+xmax))>1.0E-5 || fabs(wy-0.5*(ymin+ymax))>1.0E-5) { fputs("plcalc_world test failed\n",stderr); plend(); - exit(1); + status = 1; } /* Retrieve and print the name of the output file (if any). * This goes to stderr not stdout since it will vary between tests and * we want stdout to be identical for compare test. */ plgfnam(fnam); + if (fnam[0] == '\0') { + printf("No output file name is set\n"); + } + else { + printf("Output file name read\n"); + } fprintf(stderr,"Output file name is %s\n",fnam); /* Set and get the number of digits used to display axis labels */ @@ -162,7 +171,7 @@ if (digmax != 3) { fputs("plgxax test failed\n",stderr); plend(); - exit(1); + status = 1; } plsyax(4,0); @@ -171,7 +180,7 @@ if (digmax != 4) { fputs("plgyax test failed\n",stderr); plend(); - exit(1); + status = 1; } plszax(5,0); @@ -180,7 +189,7 @@ if (digmax != 5) { fputs("plgzax test failed\n",stderr); plend(); - exit(1); + status = 1; } plsdidev(0.05, PL_NOTSET, 0.1, 0.2); @@ -189,7 +198,7 @@ if (mar != 0.05 || jx != 0.1 || jy != 0.2) { fputs("plgdidev test failed\n",stderr); plend(); - exit(1); + status = 1; } plsdiori(1.0); @@ -198,7 +207,7 @@ if (ori != 1.0) { fputs("plgdiori test failed\n",stderr); plend(); - exit(1); + status = 1; } plsdiplt(0.1, 0.2, 0.9, 0.8); @@ -207,7 +216,7 @@ if (xmin != 0.1 || xmax != 0.9 || ymin != 0.2 || ymax != 0.8) { fputs("plgdiplt test failed\n",stderr); plend(); - exit(1); + status = 1; } plsdiplz(0.1, 0.1, 0.9, 0.9); @@ -219,7 +228,7 @@ fabs(zymax -(ymin+(ymax-ymin)*0.9)) > 1.0E-5 ) { fputs("plsdiplz test failed\n",stderr); plend(); - exit(1); + status = 1; } plscolbg(10,20,30); @@ -228,7 +237,7 @@ if (r != 10 || g != 20 || b != 30) { fputs("plgcolbg test failed\n",stderr); plend(); - exit(1); + status = 1; } plscolbga(20,30,40,0.5); @@ -237,9 +246,10 @@ if (r != 20 || g != 30 || b != 40 || a != 0.5) { fputs("plgcolbga test failed\n",stderr); plend(); - exit(1); + status = 1; } plend(); - exit(0); + + exit(status); } Modified: trunk/examples/python/xw31.py =================================================================== --- trunk/examples/python/xw31.py 2008-12-18 12:18:32 UTC (rev 9189) +++ trunk/examples/python/xw31.py 2008-12-18 12:52:48 UTC (rev 9190) @@ -56,6 +56,8 @@ def main(): + status = 0 + # Test if device initialization screwed around with the preset # compression parameter. compression2 = plgcompression() @@ -64,7 +66,7 @@ if compression2 != compression1: sys.stderr.write("plgcompression test failed\n") plend() - sys.exit(1) + status = 1 # Test if device initialization screwed around with any of the # preset familying values. @@ -73,7 +75,7 @@ if fam2 != fam1 or num2 != num1 or bmax2 != bmax1: sys.stderr.write("plgfam test failed\n") plend() - sys.exit(1) + status = 1 # Test if device initialization screwed around with any of the # preset page values. @@ -82,7 +84,7 @@ if xp2 != xp1 or yp2 != yp1 or xleng2 != xleng1 or yleng2 != yleng1 or xoff2 != xoff1 or yoff2 != yoff1: sys.stderr.write("plgpage test failed\n") plend() - sys.exit(1) + status = 1 # Exercise plscolor, plscol0, plscmap1, and plscmap1a to make sure # they work without any obvious error messages. @@ -100,7 +102,7 @@ if level2 != 1: sys.stderr.write("plglevel test failed.\n") plend() - sys.exit(1) + status = 1 pladv(0) plvpor(0.01, 0.99, 0.02, 0.49) @@ -109,7 +111,7 @@ if xmin != 0.01 or xmax != 0.99 or ymin != 0.02 or ymax != 0.49: sys.stderr.write("plgvpd test failed\n") plend() - sys.exit(1) + status = 1 xmid = 0.5*(xmin+xmax) ymid = 0.5*(ymin+ymax) @@ -119,7 +121,7 @@ if xmin != 0.2 or xmax != 0.3 or ymin != 0.4 or ymax != 0.5: sys.stderr.write("plgvpw test failed\n") plend() - sys.exit(1) + status = 1 # Get world coordinates for middle of viewport (wx, wy, win) = plcalc_world(xmid,ymid) @@ -127,10 +129,14 @@ if abs(wx-0.5*(xmin+xmax)) > 1.0E-5 or abs(wy-0.5*(ymin+ymax)) > 1.0E-5: sys.stderr.write("plcalc_world test failed\n") plend() - sys.exit(1) + status = 1 # Retrieve and print the name of the output file (if any) fnam = plgfnam() + if fnam == '' : + sys.stdout.write("No output file name is set\n") + else : + sys.stdout.write("Output file name read\n") sys.stderr.write("Output file name is %s\n" % fnam) # Set and get the number of digits used to display axis labels @@ -142,7 +148,7 @@ if digmax != 3: sys.stderr.write("plgxax test failed\n") plend() - sys.exit(1) + status = 1 plsyax(4,0) (digmax, digits) = plgyax() @@ -150,7 +156,7 @@ if digmax != 4: sys.stderr.write("plgyax test failed\n") plend() - sys.exit(1) + status = 1 plszax(5,0) (digmax, digits) = plgzax() @@ -158,7 +164,7 @@ if digmax != 5: sys.stderr.write("plgzax test failed\n") plend() - sys.exit(1) + status = 1 plsdidev(0.05, PL_NOTSET, 0.1, 0.2) (mar, aspect, jx, jy) = plgdidev() @@ -166,7 +172,7 @@ if mar != 0.05 or jx != 0.1 or jy != 0.2: sys.stderr.write("plgdidev test failed\n") plend() - sys.exit(1) + status = 1 plsdiori(1.0) ori = plgdiori() @@ -174,7 +180,7 @@ if ori != 1.0 : sys.stderr.write("plgdiori test failed\n") plend() - sys.exit(1) + status = 1 plsdiplt(0.1, 0.2, 0.9, 0.8) (xmin, ymin, xmax, ymax) = plgdiplt() @@ -182,7 +188,7 @@ if xmin != 0.1 or xmax != 0.9 or ymin != 0.2 or ymax != 0.8: sys.stderr.write("plgdiplt test failed\n") plend() - sys.exit(1) + status = 1 plsdiplz(0.1, 0.1, 0.9, 0.9) (zxmin, zymin, zxmax, zymax) = plgdiplt() @@ -190,7 +196,7 @@ if abs(zxmin -(xmin + (xmax-xmin)*0.1)) > 1.0E-5 or abs(zxmax -(xmin+(xmax-xmin)*0.9)) > 1.0E-5 or abs(zymin -(ymin+(ymax-ymin)*0.1)) > 1.0E-5 or abs(zymax -(ymin+(ymax-ymin)*0.9)) > 1.0E-5 : sys.stderr.write("plsdiplz test failed\n") plend() - sys.exit(1) + status = 1 plscolbg(10,20,30) (r, g, b) = plgcolbg() @@ -198,7 +204,7 @@ if r != 10 or g != 20 or b != 30: sys.stderr.write("plgcolbg test failed\n") plend() - sys.exit(1) + status = 1 plscolbga(20, 30, 40, 0.5) (r, g, b, a) = plgcolbga() @@ -206,12 +212,15 @@ if r != 20 or g != 30 or b != 40 or a != 0.5: sys.stderr.write("plgcolbga test failed\n") plend() - sys.exit(1) + status = 1 # Restore defaults #plcol0(1) + if status != 0 : + sys.exit(status) + main() # Terminate plplot plend() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-19 07:38:58
|
Revision: 9201 http://plplot.svn.sourceforge.net/plplot/?rev=9201&view=rev Author: airwin Date: 2008-12-19 07:38:51 +0000 (Fri, 19 Dec 2008) Log Message: ----------- Add new ex 31 for Perl to appropriate lists. Modified Paths: -------------- trunk/examples/perl/CMakeLists.txt trunk/plplot_test/test_perl.sh.in Modified: trunk/examples/perl/CMakeLists.txt =================================================================== --- trunk/examples/perl/CMakeLists.txt 2008-12-19 01:31:25 UTC (rev 9200) +++ trunk/examples/perl/CMakeLists.txt 2008-12-19 07:38:51 UTC (rev 9201) @@ -49,6 +49,7 @@ "28" "29" "30" +"31" ) set(perl_SCRIPTS) Modified: trunk/plplot_test/test_perl.sh.in =================================================================== --- trunk/plplot_test/test_perl.sh.in 2008-12-19 01:31:25 UTC (rev 9200) +++ trunk/plplot_test/test_perl.sh.in 2008-12-19 07:38:51 UTC (rev 9201) @@ -39,7 +39,7 @@ fi if [ "@HAVE_PDL_GRAPHICS_PLPLOT_40@" = "ON" ] ; then - INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30" + INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31" else # Examples 02, 20, 21, 23, 24, 28, 29, and 30 require PDL::Graphics::PLplot # version 0.46 or later. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-19 08:18:21
|
Revision: 9202 http://plplot.svn.sourceforge.net/plplot/?rev=9202&view=rev Author: airwin Date: 2008-12-19 08:18:18 +0000 (Fri, 19 Dec 2008) Log Message: ----------- Drop tee_cmd approach to capturing stdout from each command and simply replace it with ">|" to write stdout to a file directly. This change stops cluttering ctest --verbose output with individual stdout results from every command that is run. It also fixes a bug where the status was not getting propagated properly because the tee command was interfering. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/plplot_test/test_ada.sh.in trunk/plplot_test/test_c.sh.in trunk/plplot_test/test_cxx.sh.in trunk/plplot_test/test_f77.sh.in trunk/plplot_test/test_f95.sh.in trunk/plplot_test/test_java.sh.in trunk/plplot_test/test_ocaml.sh.in trunk/plplot_test/test_perl.sh.in trunk/plplot_test/test_python.sh.in trunk/plplot_test/test_tcl.sh.in Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/cmake/modules/plplot.cmake 2008-12-19 08:18:18 UTC (rev 9202) @@ -77,12 +77,6 @@ # bindings. find_program(DIFF_EXECUTABLE diff) find_program(TAIL_EXECUTABLE tail) -find_program(TEE_EXECUTABLE tee) -if(TEE_EXECUTABLE) - set(TEE_CMD "| ${TEE_EXECUTABLE} ") -else(TEE_EXECUTABLE) - set(TEE_CMD "> ") -endif(TEE_EXECUTABLE) option(PREBUILD_DIST "Pre-build all components required for distribution" OFF) Modified: trunk/plplot_test/test_ada.sh.in =================================================================== --- trunk/plplot_test/test_ada.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_ada.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -40,7 +40,7 @@ if [ "$verbose_test" ]; then echo "x${index}" fi - $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_c.sh.in =================================================================== --- trunk/plplot_test/test_c.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_c.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -37,7 +37,7 @@ echo "x${index}${lang}" fi $DEBUG_CMD $cdir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ - $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt # Look for any status codes (segfaults, plexit) from the examples themselves. status_code=$? cat test.error Modified: trunk/plplot_test/test_cxx.sh.in =================================================================== --- trunk/plplot_test/test_cxx.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_cxx.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -42,7 +42,7 @@ if [ "$verbose_test" ]; then echo "x${index}" fi - $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_f77.sh.in =================================================================== --- trunk/plplot_test/test_f77.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_f77.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -59,7 +59,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then @@ -82,7 +82,7 @@ if [ "$verbose_test" ]; then echo "x16af" fi - $DEBUG_CMD $f77dir/x16af <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f77dir/x16af <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x16af%n.$dsuffix EOF @@ -104,7 +104,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f%n.$dsuffix EOF Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_f95.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -40,7 +40,7 @@ if [ "$verbose_test" ]; then echo "x16af" fi - $DEBUG_CMD $f95dir/x16af -dev $device -o ${OUTPUT_DIR}/x16af95%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f95dir/x16af -dev $device -o ${OUTPUT_DIR}/x16af95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then @@ -60,7 +60,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then @@ -82,7 +82,7 @@ if [ "$verbose_test" ]; then echo "x16af" fi - $DEBUG_CMD $f95dir/x16af <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f95dir/x16af <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x16af95%n.$dsuffix EOF @@ -105,7 +105,7 @@ if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f95%n.$dsuffix EOF Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_java.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -49,9 +49,9 @@ echo "x${index}" fi if test "@WIN32@" == "1"; then - java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt else - java -classpath ${javadir}:${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + java -classpath ${javadir}:${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt fi status_code=$? cat test.error Modified: trunk/plplot_test/test_ocaml.sh.in =================================================================== --- trunk/plplot_test/test_ocaml.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_ocaml.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -29,7 +29,7 @@ echo "x${index}ocaml" fi $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ - $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt # Look for any status codes (segfaults, plexit) from the examples themselves. status_code=$? cat test.error Modified: trunk/plplot_test/test_perl.sh.in =================================================================== --- trunk/plplot_test/test_perl.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_perl.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -50,7 +50,7 @@ if [ "$verbose_test" ]; then echo "x${index}.pl" fi - $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_python.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -37,7 +37,7 @@ if [ "$verbose_test" ]; then echo "x${index}" fi - @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then Modified: trunk/plplot_test/test_tcl.sh.in =================================================================== --- trunk/plplot_test/test_tcl.sh.in 2008-12-19 07:38:51 UTC (rev 9201) +++ trunk/plplot_test/test_tcl.sh.in 2008-12-19 08:18:18 UTC (rev 9202) @@ -79,7 +79,7 @@ if [ "$verbose_test" ]; then echo "x${index}" fi - ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error @TEE_CMD@ ${results}/x${index}${lang}_${dsuffix}.txt + ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-12-19 17:12:42
|
Revision: 9205 http://plplot.svn.sourceforge.net/plplot/?rev=9205&view=rev Author: andrewross Date: 2008-12-19 17:12:37 +0000 (Fri, 19 Dec 2008) Log Message: ----------- Set compression level to 95 in example 31. The previous value of 100 is not valid for the png driver. Modified Paths: -------------- trunk/bindings/octave/demos/x31c.m trunk/examples/c/x31c.c trunk/examples/c++/x31.cc trunk/examples/f77/x31f.fm4 trunk/examples/f95/x31f.f90 trunk/examples/java/x31.java trunk/examples/perl/x31.pl trunk/examples/python/xw31.py Modified: trunk/bindings/octave/demos/x31c.m =================================================================== --- trunk/bindings/octave/demos/x31c.m 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/bindings/octave/demos/x31c.m 2008-12-19 17:12:37 UTC (rev 9205) @@ -54,7 +54,7 @@ ## (void) plparseopts(&argc, argv, PL_PARSE_FULL); ## Test setting / getting compression parameter across plint - compression1 = 100; + compression1 = 95; plscompression(compression1); ## Test setting / getting familying parameters across plinit Modified: trunk/examples/c/x31c.c =================================================================== --- trunk/examples/c/x31c.c 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/c/x31c.c 2008-12-19 17:12:37 UTC (rev 9205) @@ -50,7 +50,7 @@ (void) plparseopts(&argc, argv, PL_PARSE_FULL); /* Test setting / getting compression parameter across plinit. */ - compression1 = 100; + compression1 = 95; plscompression(compression1); /* Test setting / getting familying parameters across plinit */ Modified: trunk/examples/c++/x31.cc =================================================================== --- trunk/examples/c++/x31.cc 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/c++/x31.cc 2008-12-19 17:12:37 UTC (rev 9205) @@ -71,7 +71,7 @@ pls->parseopts(&argc, argv, PL_PARSE_FULL); // Test setting / getting compression parameter across plinit. - compression1 = 100; + compression1 = 95; pls->scompression(compression1); // Test setting / getting familying parameters across plinit Modified: trunk/examples/f77/x31f.fm4 =================================================================== --- trunk/examples/f77/x31f.fm4 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/f77/x31f.fm4 2008-12-19 17:12:37 UTC (rev 9205) @@ -57,7 +57,7 @@ call plparseopts(PL_PARSE_FULL) C Test setting / getting compression parameter across plinit - compression1 = 100 + compression1 = 95 call plscompression(compression1) C Test setting / getting familying parameters across plinit Modified: trunk/examples/f95/x31f.f90 =================================================================== --- trunk/examples/f95/x31f.f90 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/f95/x31f.f90 2008-12-19 17:12:37 UTC (rev 9205) @@ -56,7 +56,7 @@ call plparseopts(PL_PARSE_FULL) ! Test setting / getting compression parameter across plinit - compression1 = 100 + compression1 = 95 call plscompression(compression1) ! Test setting / getting familying parameters across plinit Modified: trunk/examples/java/x31.java =================================================================== --- trunk/examples/java/x31.java 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/java/x31.java 2008-12-19 17:12:37 UTC (rev 9205) @@ -75,7 +75,7 @@ pls.parseopts(args, PLStream.PL_PARSE_FULL | PLStream.PL_PARSE_NOPROGRAM); // Test setting / getting compression parameter across plinit. - compression1[0] = 100; + compression1[0] = 95; pls.scompression(compression1[0]); // Test setting / getting familying parameters across plinit Modified: trunk/examples/perl/x31.pl =================================================================== --- trunk/examples/perl/x31.pl 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/perl/x31.pl 2008-12-19 17:12:37 UTC (rev 9205) @@ -32,7 +32,7 @@ plParseOpts (\@ARGV, PL_PARSE_SKIP | PL_PARSE_NOPROGRAM); # Test setting / getting compression parameter across plinit. -my $compression1 = 100; +my $compression1 = 95; plscompression ($compression1); # Test setting / getting familying parameters across plinit. Modified: trunk/examples/python/xw31.py =================================================================== --- trunk/examples/python/xw31.py 2008-12-19 11:56:53 UTC (rev 9204) +++ trunk/examples/python/xw31.py 2008-12-19 17:12:37 UTC (rev 9205) @@ -31,7 +31,7 @@ plparseopts(sys.argv, PL_PARSE_FULL) # Test setting / getting compression parameter across plinit. -compression1 = 100 +compression1 = 95 plscompression(compression1) # Test setting / getting familying parameters across plinit. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-20 00:57:39
|
Revision: 9211 http://plplot.svn.sourceforge.net/plplot/?rev=9211&view=rev Author: airwin Date: 2008-12-20 00:57:35 +0000 (Sat, 20 Dec 2008) Log Message: ----------- Implement example 31 for tcl which gives a consistent graphics and stdout results with the corrsponding C example. Modified Paths: -------------- trunk/examples/tcl/CMakeLists.txt trunk/plplot_test/test_tcl.sh.in Added Paths: ----------- trunk/examples/tcl/x31 trunk/examples/tcl/x31.tcl Modified: trunk/examples/tcl/CMakeLists.txt =================================================================== --- trunk/examples/tcl/CMakeLists.txt 2008-12-20 00:48:11 UTC (rev 9210) +++ trunk/examples/tcl/CMakeLists.txt 2008-12-20 00:57:35 UTC (rev 9211) @@ -59,6 +59,7 @@ "28" "29" "30" +"31" ) set(tcl_SCRIPTS) Added: trunk/examples/tcl/x31 =================================================================== --- trunk/examples/tcl/x31 (rev 0) +++ trunk/examples/tcl/x31 2008-12-20 00:57:35 UTC (rev 9211) @@ -0,0 +1,18 @@ +#!/bin/sh +#--------------------------------*- Tcl -*------------------------------------# +# $Id$ +# +# Maurice LeBrun +# 12/24/02 +# +# A front-end to x31.tcl for running directly from the command line, locating +# pltcl via PATH. +# Handles all usual plplot command arguments. See "pltcl -h" for info. +#-----------------------------------------------------------------------------# +#\ +exec pltcl -f "$0" ${1+"$@"} + +source x31.tcl + +# Note x31.tcl handles both plinit and plend. +x31 Property changes on: trunk/examples/tcl/x31 ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/examples/tcl/x31.tcl =================================================================== --- trunk/examples/tcl/x31.tcl (rev 0) +++ trunk/examples/tcl/x31.tcl 2008-12-20 00:57:35 UTC (rev 9211) @@ -0,0 +1,190 @@ +#---------------------------------------------------------------------------- +# $Id$ +#---------------------------------------------------------------------------- + +proc x31 {{w loopback}} { + + # this constant should be defined centrally. + set PL_NOTSET -42 + + set compression1 95 + $w cmd plscompression $compression1 + # Test setting / getting familying parameters across plinit. + set fam1 0 + set num1 10 + set bmax1 1000 + $w cmd plsfam $fam1 $num1 $bmax1 + + # Test setting / getting page parameters across plinit. + set xp1 200. + set yp1 200. + set xleng1 400 + set yleng1 200 + set xoff1 10 + set yoff1 20 + $w cmd plspage $xp1 $yp1 $xleng1 $yleng1 $xoff1 $yoff1 + + $w cmd plinit + + set status 0 + + # Test if device initialization screwed around with the preset + # compression parameter. + $w cmd plgcompression compression2 + puts [ format "Output various PLplot parameters" ] + puts [ format "compression parameter = %d" $compression2 ] + if {$compression2 != $compression1} { + puts stderr "plgcompression test failed" + set status 1 + } + + # Test if device initialization screwed around with any of the + # preset familying values. + $w cmd plgfam fam2 num2 bmax2 + puts [ format "family parameters: fam, num, bmax = %d %d %d" $fam2 $num2 $bmax2 ] + if {$fam2 != $fam1 || $num2 != $num1 || $bmax2 != $bmax1} { + puts stderr "plgfam test failed" + set status 1 + } + + # Test if device initialization screwed around with any of the + # preset page values. + $w cmd plgpage xp2 yp2 xleng2 yleng2 xoff2 yoff2 + puts [ format "page parameters: xp, yp, xleng, yleng, xoff, yoff = %f %f %d %d %d %d" $xp2 $yp2 $xleng2 $yleng2 $xoff2 $yoff2 ] + if {$xp2 != $xp1 || $yp2 != $yp1 || $xleng2 != $xleng1 || $yleng2 != $yleng1 || $xoff2 != $xoff1 || $yoff2 != $yoff1} { + puts stderr "plgpage test failed" + set status 1 + } + + # Exercise plscolor, plscol0, plscmap1, and plscmap1a to make sure + # they work without any obvious error messages. + $w cmd plscolor 1 + matrix r1 i 2 = {0, 255} + matrix g1 i 2 = {255, 0} + matrix b1 i 2 = {0, 0} + matrix a1 f 2 = {1.0, 1.0} + $w cmd plscmap1 r1 g1 b1 2 + $w cmd plscmap1a r1 g1 b1 a1 2 + + $w cmd plglevel level2 + puts [ format "level parameter = %d" $level2 ] + if {$level2 != 1} { + puts stderr "plglevel test failed." + set status 1 + } + + $w cmd pladv 0 + $w cmd plvpor 0.01 0.99 0.02 0.49 + $w cmd plgvpd xmin xmax ymin ymax + puts [ format "plvpor: xmin, xmax, ymin, ymax = %f %f %f %f" $xmin $xmax $ymin $ymax ] + if {$xmin != 0.01 || $xmax != 0.99 || $ymin != 0.02 || $ymax != 0.49} { + puts stderr "plgvpd test failed" + set status 1 + } + set xmid [ expr 0.5*($xmin+$xmax) ] + set ymid [ expr 0.5*($ymin+$ymax) ] + + $w cmd plwind 0.2 0.3 0.4 0.5 + $w cmd plgvpw xmin xmax ymin ymax + puts [ format "plwind: xmin, xmax, ymin, ymax = %f %f %f %f" $xmin $xmax $ymin $ymax ] + if {$xmin != 0.2 || $xmax != 0.3 || $ymin != 0.4 || $ymax != 0.5} { + puts stderr "plgvpw test failed" + set status 1 + } + + # Get world coordinates for middle of viewport + $w cmd plcalc_world $xmid $ymid wx wy win + puts [ format "world parameters: wx, wy, win = %f %f %d" $wx $wy $win ] + if {abs($wx-0.5*($xmin+$xmax)) > 1.0E-5 || abs($wy-0.5*($ymin+$ymax)) > 1.0E-5} { + puts stderr "plcalc_world test failed" + set status 1 + } + + # Retrieve and print the name of the output file (if any) + $w cmd plgfnam fnam + if {$fnam == ""} { + puts [ format "No output file name is set" ] + } {else} { + puts [ format "Output file name read" ] + } + puts stderr [ format "Output file name is %s" $fnam ] + + # Set and get the number of digits used to display axis labels + # Note digits is currently ignored in pls[xyz]ax and + # therefore it does not make sense to test the returned value. + $w cmd plsxax 3 0 + $w cmd plgxax digmax digits + puts [ format "x axis parameters: digmax, digits = %d %d" $digmax $digits ] + if {$digmax != 3} { + puts stderr "plgxax test failed" + set status 1 + } + + $w cmd plsyax 4 0 + $w cmd plgyax digmax digits + puts [ format "y axis parameters: digmax, digits = %d %d" $digmax $digits ] + if {$digmax != 4} { + puts stderr "plgyax test failed" + set status 1 + } + $w cmd plszax 5 0 + $w cmd plgzax digmax digits + puts [ format "z axis parameters: digmax, digits = %d %d" $digmax $digits ] + if {$digmax != 5} { + puts stderr "plgzax test failed" + set status 1 + } + + $w cmd plsdidev 0.05 $PL_NOTSET 0.1 0.2 + $w cmd plgdidev mar aspect jx jy + puts [ format "device-space window parameters: mar, aspect, jx, jy = %f %f %f %f" $mar $aspect $jx $jy ] + if {$mar != 0.05 || $jx != 0.1 || $jy != 0.2} { + puts stderr "plgdidev test failed" + set status 1 + } + + $w cmd plsdiori 1.0 + $w cmd plgdiori ori + puts [ format "ori parameter = %f" $ori ] + if {$ori != 1.0 } { + puts stderr "plgdiori test failed" + set status 1 + } + + $w cmd plsdiplt 0.1 0.2 0.9 0.8 + $w cmd plgdiplt xmin ymin xmax ymax + puts [ format "plot-space window parameters: xmin, ymin, xmax, ymax = %f %f %f %f" $xmin $ymin $xmax $ymax ] + if {$xmin != 0.1 || $xmax != 0.9 || $ymin != 0.2 || $ymax != 0.8} { + puts stderr "plgdiplt test failed" + set status 1 + } + + $w cmd plsdiplz 0.1 0.1 0.9 0.9 + $w cmd plgdiplt zxmin zymin zxmax zymax + puts [ format "zoomed plot-space window parameters: xmin, ymin, xmax, ymax = %f %f %f %f" $zxmin $zymin $zxmax $zymax ] + if {abs($zxmin -($xmin + ($xmax-$xmin)*0.1)) > 1.0E-5 || abs($zxmax -($xmin+($xmax-$xmin)*0.9)) > 1.0E-5 || abs($zymin -($ymin+($ymax-$ymin)*0.1)) > 1.0E-5 || abs($zymax -($ymin+($ymax-$ymin)*0.9)) > 1.0E-5 } { + puts stderr "plsdiplz test failed" + set status 1 + } + + $w cmd plscolbg 10 20 30 + $w cmd plgcolbg r g b + puts [ format "background colour parameters: r, g, b = %d %d %d" $r $g $b ] + if {$r != 10 || $g != 20 || $b != 30} { + puts stderr "plgcolbg test failed" + set status 1 + } + + $w cmd plscolbga 20 30 40 0.5 + $w cmd plgcolbga r g b a + puts [ format "background/transparency colour parameters: r, g, b, a = %d %d %d %f" $r $g $b $a ] + if {$r != 20 || $g != 30 || $b != 40 || $a != 0.5} { + puts stderr "plgcolbga test failed" + set status 1 + } + + + # Restore defaults + # $w cmd plcol0 1 + $w cmd plend +} Property changes on: trunk/examples/tcl/x31.tcl ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/plplot_test/test_tcl.sh.in =================================================================== --- trunk/plplot_test/test_tcl.sh.in 2008-12-20 00:48:11 UTC (rev 9210) +++ trunk/plplot_test/test_tcl.sh.in 2008-12-20 00:57:35 UTC (rev 9211) @@ -75,7 +75,7 @@ # Skip 17th example because it is not implemented (and if it was, it # would be interactive only). # Other examples are not yet implemented. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-30 03:11:06
|
Revision: 9234 http://plplot.svn.sourceforge.net/plplot/?rev=9234&view=rev Author: airwin Date: 2008-12-30 03:11:03 +0000 (Tue, 30 Dec 2008) Log Message: ----------- Consistent changes to all versions of example 23 to get rid of extra blank in stdout. Modified Paths: -------------- trunk/bindings/octave/demos/x23c.m trunk/examples/ada/x23a.adb.cmake trunk/examples/ada/xthick23a.adb.cmake trunk/examples/c/x23c.c trunk/examples/c++/x23.cc trunk/examples/f77/x23f.fm4 trunk/examples/f95/x23f.f90 trunk/examples/java/x23.java trunk/examples/ocaml/x23.ml trunk/examples/perl/x23.pl trunk/examples/python/xw23.py trunk/examples/tcl/x23.tcl Modified: trunk/bindings/octave/demos/x23c.m =================================================================== --- trunk/bindings/octave/demos/x23c.m 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/bindings/octave/demos/x23c.m 2008-12-30 03:11:03 UTC (rev 9234) @@ -277,7 +277,7 @@ fci_old = plgfci(); [ifamily,istyle,iweight] = plgfont(); fprintf(strm,"For example 23 prior to page 12 the FCI is 0x%x\n",fci_old); -fprintf(strm,"For example 23 prior to page 12 the font family, style and weight are %s %s %s\n",deblank(family(ifamily+1,:)), deblank(style(istyle+1,:)), deblank(weight(iweight+1,:))); +fprintf(strm,"For example 23 prior to page 12 the font family, style and weight are %s %s %s\n",deblank(family(ifamily+1,:)), deblank(style(istyle+1,:)), deblank(weight(iweight+1,:))); for page=11:15 dy = 0.030; Modified: trunk/examples/ada/x23a.adb.cmake =================================================================== --- trunk/examples/ada/x23a.adb.cmake 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/ada/x23a.adb.cmake 2008-12-30 03:11:03 UTC (rev 9234) @@ -371,7 +371,7 @@ -- Put(fci_old, Base => 16, Width => 0); -- Outputs "Ada" style. Put("0x" & Hex_Image_8(fci_old)); -- Outputs "C" style. New_Line; - Put("For example 23 prior to page 12 the font family, style and weight are " + Put("For example 23 prior to page 12 the font family, style and weight are " & family(ifamily) & " " & style(istyle) & " " & weight(iweight)); New_Line; Modified: trunk/examples/ada/xthick23a.adb.cmake =================================================================== --- trunk/examples/ada/xthick23a.adb.cmake 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/ada/xthick23a.adb.cmake 2008-12-30 03:11:03 UTC (rev 9234) @@ -371,7 +371,7 @@ -- Put(fci_old, Base => 16, Width => 0); -- Outputs "Ada" style. Put("0x" & Hex_Image_8(fci_old)); -- Outputs "C" style. New_Line; - Put("For example 23 prior to page 12 the font family, style and weight are " + Put("For example 23 prior to page 12 the font family, style and weight are " & family(ifamily) & " " & style(istyle) & " " & weight(iweight)); New_Line; Modified: trunk/examples/c/x23c.c =================================================================== --- trunk/examples/c/x23c.c 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/c/x23c.c 2008-12-30 03:11:03 UTC (rev 9234) @@ -284,7 +284,7 @@ plgfci(&fci_old); plgfont(&ifamily, &istyle, &iweight); printf("For example 23 prior to page 12 the FCI is 0x%x\n",fci_old); - printf("For example 23 prior to page 12 the font family, style and weight are %s %s %s\n",family[ifamily], style[istyle], weight[iweight]); + printf("For example 23 prior to page 12 the font family, style and weight are %s %s %s\n",family[ifamily], style[istyle], weight[iweight]); for (page=11; page<16; page++) { PLFLT dy = 0.030; Modified: trunk/examples/c++/x23.cc =================================================================== --- trunk/examples/c++/x23.cc 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/c++/x23.cc 2008-12-30 03:11:03 UTC (rev 9234) @@ -312,7 +312,7 @@ pls->gfci(fci_old); pls->gfont(ifamily, istyle, iweight); cout << "For example 23 prior to page 12 the FCI is 0x" << hex << fci_old << endl; - cout << "For example 23 prior to page 12 the font family, style and weight are " << family[ifamily] << " " << style[istyle] << " " << weight[iweight] << endl; + cout << "For example 23 prior to page 12 the font family, style and weight are " << family[ifamily] << " " << style[istyle] << " " << weight[iweight] << endl; for (page=11; page<16; page++) { PLFLT dy = 0.030; Modified: trunk/examples/f77/x23f.fm4 =================================================================== --- trunk/examples/f77/x23f.fm4 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/f77/x23f.fm4 2008-12-30 03:11:03 UTC (rev 9234) @@ -313,7 +313,7 @@ write (*,'(a,z8)') 'For example 23 prior to page 12 the FCI is 0x' & ,fci_old write (*,'(a)') 'For example 23 prior to page 12 the '// - & 'font family, style and weight are '// + & 'font family, style and weight are '// & trim(family(ifamily+1))//' '//trim(style(istyle+1))//' '// & trim(weight(iweight+1)) Modified: trunk/examples/f95/x23f.f90 =================================================================== --- trunk/examples/f95/x23f.f90 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/f95/x23f.f90 2008-12-30 03:11:03 UTC (rev 9234) @@ -302,7 +302,7 @@ call plgfci(fci_old) call plgfont(ifamily, istyle, iweight) write (*,'(a,z8)') 'For example 23 prior to page 12 the FCI is 0x',fci_old - write (*,'(a)') 'For example 23 prior to page 12 the font family, style and weight are '// & + write (*,'(a)') 'For example 23 prior to page 12 the font family, style and weight are '// & trim(family(ifamily+1))//' '//trim(style(istyle+1))//' '//trim(weight(iweight+1)) do page=11,15 Modified: trunk/examples/java/x23.java =================================================================== --- trunk/examples/java/x23.java 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/java/x23.java 2008-12-30 03:11:03 UTC (rev 9234) @@ -298,7 +298,7 @@ pls.gfci(fci_old); pls.gfont(ifamily, istyle, iweight); System.out.println("For example 23 prior to page 12 the FCI is 0x"+Long.toHexString(fci_old[0])); - System.out.println("For example 23 prior to page 12 the font family, style and weight are "+family[ifamily[0]]+" "+ style[istyle[0]]+ " "+ weight[iweight[0]]);; + System.out.println("For example 23 prior to page 12 the font family, style and weight are "+family[ifamily[0]]+" "+ style[istyle[0]]+ " "+ weight[iweight[0]]);; for (page=11; page<16; page++) { double dy = 0.030; Modified: trunk/examples/ocaml/x23.ml =================================================================== --- trunk/examples/ocaml/x23.ml 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/ocaml/x23.ml 2008-12-30 03:11:03 UTC (rev 9234) @@ -276,7 +276,7 @@ let ifamily, istyle, iweight = plgfont () in printf "For example 23 prior to page 12 the FCI is 0x%lx\n" (Int64.to_int32 fci_old); - printf "For example 23 prior to page 12 the font family, style and weight are %s %s %s\n" + printf "For example 23 prior to page 12 the font family, style and weight are %s %s %s\n" family.(ifamily) style.(istyle) weight.(iweight); for page = 11 to 15 do Modified: trunk/examples/perl/x23.pl =================================================================== --- trunk/examples/perl/x23.pl 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/perl/x23.pl 2008-12-30 03:11:03 UTC (rev 9234) @@ -276,7 +276,7 @@ my ($ifamily, $istyle, $iweight) = plgfont(); 1; printf("For example 23 prior to page 12 the FCI is 0x%x\n",$fci_old); -printf("For example 23 prior to page 12 the font family, style and weight are %s %s %s\n", +printf("For example 23 prior to page 12 the font family, style and weight are %s %s %s\n", $family[$ifamily], $style[$istyle], $weight[$iweight]); for (my $page=11; $page<16; $page++) { Modified: trunk/examples/python/xw23.py =================================================================== --- trunk/examples/python/xw23.py 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/python/xw23.py 2008-12-30 03:11:03 UTC (rev 9234) @@ -258,7 +258,7 @@ istyle = font[1] iweight = font[2] print "For example 23 prior to page 12 the FCI is",hex(fci_old) - print "For example 23 prior to page 12 the font family, style and weight are ",family[ifamily],style[istyle],weight[iweight] + print "For example 23 prior to page 12 the font family, style and weight are %s %s %s" % (family[ifamily],style[istyle],weight[iweight]) FCI_COMBINATIONS = 30 dy = 0.030 Modified: trunk/examples/tcl/x23.tcl =================================================================== --- trunk/examples/tcl/x23.tcl 2008-12-30 00:03:38 UTC (rev 9233) +++ trunk/examples/tcl/x23.tcl 2008-12-30 03:11:03 UTC (rev 9234) @@ -299,7 +299,7 @@ $w cmd plgfci fci_old $w cmd plgfont ifamily istyle iweight puts [ format "For example 23 prior to page 12 the FCI is 0x%x" $fci_old ] - puts [ format "For example 23 prior to page 12 the font family, style and weight are %s %s %s" \ + puts [ format "For example 23 prior to page 12 the font family, style and weight are %s %s %s" \ $family($ifamily) $style($istyle) $weight($iweight) ] for {set page 11} {$page<16} {incr page} { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2008-12-31 18:10:30
|
Revision: 9239 http://plplot.svn.sourceforge.net/plplot/?rev=9239&view=rev Author: airwin Date: 2008-12-31 18:10:26 +0000 (Wed, 31 Dec 2008) Log Message: ----------- Update from PDL-Graphics-PLplot-0.46 to PDL-Graphics-PLplot-0.47 as the definitive version you have to have in order to run all the standard examples. Modified Paths: -------------- trunk/cmake/modules/pdl.cmake trunk/examples/perl/README.perldemos Modified: trunk/cmake/modules/pdl.cmake =================================================================== --- trunk/cmake/modules/pdl.cmake 2008-12-31 17:24:33 UTC (rev 9238) +++ trunk/cmake/modules/pdl.cmake 2008-12-31 18:10:26 UTC (rev 9239) @@ -69,17 +69,17 @@ ERROR_VARIABLE PDL_PLPLOT_VERSION ) #message("PDL_PLPLOT_VERSION = ${PDL_PLPLOT_VERSION}") - transform_version(NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION "0.46.0") + transform_version(NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION "0.47.0") transform_version(NUMERICAL_PDL_PLPLOT_VERSION "${PDL_PLPLOT_VERSION}.0") #message("NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION = ${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}") #message("NUMERICAL_PDL_PLPLOT_VERSION = ${NUMERICAL_PDL_PLPLOT_VERSION}") if(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}") message(STATUS "WARNING: " - "perl PDL PLplot version < 0.46 " + "perl PDL PLplot version < 0.47 " "Using more limited set of Perl/PDL examples that work with old versions") - set(HAVE_PDL_GRAPHICS_PLPLOT_40 OFF CACHE BOOL "PDL-Graphics-PLplot version is 0.46 or higher" FORCE) + set(HAVE_PDL_GRAPHICS_PLPLOT_40 OFF CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE) else(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}") - set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.46 or higher" FORCE) + set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE) endif(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}") endif(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}") else(NOT PDL_RETURNCODE) Modified: trunk/examples/perl/README.perldemos =================================================================== --- trunk/examples/perl/README.perldemos 2008-12-31 17:24:33 UTC (rev 9238) +++ trunk/examples/perl/README.perldemos 2008-12-31 18:10:26 UTC (rev 9239) @@ -2,16 +2,16 @@ --------------------------- The files in this directory are close translations of the PLplot demos -witten in C (see directory above ../c/). They use the PDL and +written in C (see directory above ../c/). They use the PDL and PDL::Graphics::PLplot modules distributed with PDL. Here is a recipe for building and installing the latest version of that module. Instructions for building and installing Doug Hunt's latest version of the -PDL Graphics PLplot module (version 0.46 at the time of writing) +PDL Graphics PLplot module (version 0.47 at the time of writing) -export TARBALL_ROOT_NAME=PDL-Graphics-PLplot-0.46 +export TARBALL_ROOT_NAME=PDL-Graphics-PLplot-0.47 wget \ http://search.cpan.org/CPAN/authors/id/D/DH/DHUNT/$TARBALL_ROOT_NAME.tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-01-01 02:38:05
|
Revision: 9240 http://plplot.svn.sourceforge.net/plplot/?rev=9240&view=rev Author: jbauck Date: 2009-01-01 02:38:00 +0000 (Thu, 01 Jan 2009) Log Message: ----------- Update Ada examples xthick29a.adb and x29a.adb to match recent changes in the C version. Extended the comment in xthick29a.adb and x29a.adb clarifying the use of Ada versus C time calculations. Reversed the logic of plprec and Set_Numeric_Label_Precision in the bindings so that those accustomed to C-think whereby 0 = False and 1 = True will not be surprised. True now means "set manually" whereas before True meant "set automatically." This breaks backward compatibility at the Ada API level. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x29a.adb.cmake trunk/examples/ada/xthick29a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2008-12-31 18:10:26 UTC (rev 9239) +++ trunk/bindings/ada/plplot.adb.cmake 2009-01-01 02:38:00 UTC (rev 9240) @@ -2040,13 +2040,13 @@ -- Set the floating point precision (in number of places) in numeric labels. -- plprec procedure Set_Numeric_Label_Precision - (Set_Automatically : Boolean := False; + (Set_Manually : Boolean := True; Number_Digits_After_Decimal_Point : Integer := 2) is begin - if Set_Automatically then + if Set_Manually then + plprec(1, Number_Digits_After_Decimal_Point); + else plprec(0, Number_Digits_After_Decimal_Point); - else - plprec(1, Number_Digits_After_Decimal_Point); end if; end Set_Numeric_Label_Precision; Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2008-12-31 18:10:26 UTC (rev 9239) +++ trunk/bindings/ada/plplot.ads.cmake 2009-01-01 02:38:00 UTC (rev 9240) @@ -1224,7 +1224,7 @@ -- Set the floating point precision (in number of places) in numeric labels. -- plprec procedure Set_Numeric_Label_Precision - (Set_Automatically : Boolean := False; + (Set_Manually : Boolean := True; Number_Digits_After_Decimal_Point : Integer := 2); Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2008-12-31 18:10:26 UTC (rev 9239) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-01-01 02:38:00 UTC (rev 9240) @@ -1958,13 +1958,13 @@ -- Set the floating point precision (in number of places) in numeric labels. procedure plprec - (Set_Automatically : Boolean := False; + (Set_Manually : Boolean := True; Number_Digits_After_Decimal_Point : Integer := 2) is begin - if Set_Automatically then + if Set_Manually then + PLplot_Thin.plprec(1, Number_Digits_After_Decimal_Point); + else PLplot_Thin.plprec(0, Number_Digits_After_Decimal_Point); - else - PLplot_Thin.plprec(1, Number_Digits_After_Decimal_Point); end if; end plprec; Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2008-12-31 18:10:26 UTC (rev 9239) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-01-01 02:38:00 UTC (rev 9240) @@ -1138,7 +1138,7 @@ -- Set the floating point precision (in number of places) in numeric labels. procedure plprec - (Set_Automatically : Boolean := False; + (Set_Manually : Boolean := True; Number_Digits_After_Decimal_Point : Integer := 2); Modified: trunk/examples/ada/x29a.adb.cmake =================================================================== --- trunk/examples/ada/x29a.adb.cmake 2008-12-31 18:10:26 UTC (rev 9239) +++ trunk/examples/ada/x29a.adb.cmake 2009-01-01 02:38:00 UTC (rev 9240) @@ -38,7 +38,7 @@ --with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ ------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- -- Draws several plots which demonstrate the use of date / time formats for -- the axis labels. -- Time formatting is done using the system strftime routine. See the @@ -48,13 +48,13 @@ -- 2) Plotting -- -- Note: Times are stored as seconds since the epoch (usually 1st Jan 1970). --- ------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- procedure x29a is -- Plot a model diurnal cycle of temperature procedure plot1 is - x, y : Real_Vector(0 .. 144); + x, y : Real_Vector(0 .. 72); + xerr1, xerr2, yerr1, yerr2 : Real_Vector(0 .. 72); -- Data points every 10 minutes for 1 day xmin, xmax, ymin, ymax : Long_Float; @@ -67,10 +67,24 @@ for i in x'range loop x(i) := xmax * Long_Float(i) / Long_Float(x'length); y(i) := 15.0 - 5.0 * cos( 2.0 * pi * Long_Float(i) / Long_Float(x'length)); + + -- Set x error bars to +/- 5 minute + xerr1(i) := x(i) - Long_Float(60 * 5); + xerr2(i) := x(i) + Long_Float(60 * 5); + + -- Set y error bars to +/- 0.1 deg C */ + yerr1(i) := y(i) - 0.1; + yerr2(i) := y(i) + 0.1; end loop; pladv(0); + -- Rescale major ticks marks by 0.5 + plsmaj(0.0, 0.5); + + -- Rescale minor ticks and error bar marks by 0.5 + plsmin(0.0, 0.5); + plvsta; plwind(xmin, xmax, ymin, ymax); @@ -82,9 +96,18 @@ plbox("bcnstd", 3.0 * 60.0 * 60.0, 3, "bcnstv", 1.0, 5); plcol0(3); - pllab("Time (hours:mins)", "Temperature (degC)", "#frPLplot Example 29 - Daily temperature"); + pllab("Time (hours:mins)", "Temperature (degC)", "@frPLplot Example 29 - Daily temperature"); plcol0(4); plline(x, y); + + plcol0(2); + plerrx(xerr1, xerr2, y); + plcol0(3); + plerry(x, yerr1, yerr2); + + -- Rescale major / minor tick marks back to default + plsmin(0.0, 1.0); + plsmaj(0.0, 1.0); end plot1; @@ -118,13 +141,15 @@ -- Set time format to be abbreviated month name followed by day of month pltimefmt("%b %d"); + plprec(True, 1); plenv(xmin, xmax, ymin, ymax, 0, 40); plcol0(3); - pllab("Date", "Hours of daylight", "#frPLplot Example 29 - Hours of daylight at 51.5N"); - + pllab("Date", "Hours of daylight", "@frPLplot Example 29 - Hours of daylight at 51.5N"); plcol0(4); plline(x, y); + + plprec(False, 0); end plot2; @@ -134,9 +159,17 @@ begin -- Find the number of seconds since January 1, 1970 to December 1, 2005. -- Should be 1_133_395_200.0. - -- This method does not work reliably for timezones which were - -- on daylight saving time on Janary 1 1970, e.g. the UK. + + -- NOTE that some PLplot developers claim that the Time_Of function + -- is incorrect, saying that this method does not work reliably for + -- time zones which were on daylight saving time on Janary 1 1970, e.g. + -- the UK. However, there is confusion over the C and/or Unix + -- time functions which apparently refer to local time: Time_Of does + -- not refer to local time. The following commented-out line which + -- calculates xmin returns 1133395200.0 which is identical to the + -- PLplot-developer-agreed-to value which is hard-coded here. Go figure. -- xmin := Long_Float(Time_Of(2005, 12, 1, 0.0) - Time_Of(1970, 1, 1, 0.0)); + -- For now we will just hard code it xmin := 1133395200.0; @@ -165,10 +198,12 @@ plbox("bcnstd", 14.0 * 24.0 * 60.0 * 60.0, 14, "bcnstv", 1.0, 4); plcol0(3); - pllab("Date", "Hours of television watched", "#frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); - + pllab("Date", "Hours of television watched", "@frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); plcol0(4); + -- Rescale symbol size (used by plpoin) by 0.5 + plssym(0.0,0.5); + plpoin(x, y, 2); plline(x, y); @@ -181,6 +216,9 @@ -- Initialize plplot plinit; + -- Change the escape character to a '@' instead of the default '#' + plsesc('@'); + plot1; plot2; plot3; Modified: trunk/examples/ada/xthick29a.adb.cmake =================================================================== --- trunk/examples/ada/xthick29a.adb.cmake 2008-12-31 18:10:26 UTC (rev 9239) +++ trunk/examples/ada/xthick29a.adb.cmake 2009-01-01 02:38:00 UTC (rev 9240) @@ -38,10 +38,23 @@ --with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; @Ada_Is_2007_With_and_Use_Numerics@ +-------------------------------------------------------------------------------- +-- Draws several plots which demonstrate the use of date / time formats for +-- the axis labels. +-- Time formatting is done using the system strftime routine. See the +-- documentation of this for full details of the available formats. +-- +-- 1) Plotting temperature over a day (using hours / minutes) +-- 2) Plotting +-- +-- Note: Times are stored as seconds since the epoch (usually 1st Jan 1970). +-------------------------------------------------------------------------------- + procedure xthick29a is -- Plot a model diurnal cycle of temperature procedure plot1 is - x, y : Real_Vector(0 .. 144); + x, y : Real_Vector(0 .. 72); + xerr1, xerr2, yerr1, yerr2 : Real_Vector(0 .. 72); -- Data points every 10 minutes for 1 day xmin, xmax, ymin, ymax : Long_Float; @@ -54,10 +67,24 @@ for i in x'range loop x(i) := xmax * Long_Float(i) / Long_Float(x'length); y(i) := 15.0 - 5.0 * cos( 2.0 * pi * Long_Float(i) / Long_Float(x'length)); + + -- Set x error bars to +/- 5 minute + xerr1(i) := x(i) - Long_Float(60 * 5); + xerr2(i) := x(i) + Long_Float(60 * 5); + + -- Set y error bars to +/- 0.1 deg C */ + yerr1(i) := y(i) - 0.1; + yerr2(i) := y(i) + 0.1; end loop; Advance_To_Subpage(Next_Subpage); + -- Rescale major ticks marks by 0.5 + Set_Major_Tick_Length(0.0, 0.5); + + -- Rescale minor ticks and error bar marks by 0.5 + Set_Minor_Tick_Length(0.0, 0.5); + Set_Viewport_Standard; Set_Viewport_World(xmin, xmax, ymin, ymax); @@ -69,9 +96,18 @@ Box_Around_Viewport("bcnstd", 3.0 * 60.0 * 60.0, 3, "bcnstv", 1.0, 5); Set_Pen_Color(Green); - Write_Labels("Time (hours:mins)", "Temperature (degC)", "#frPLplot Example 29 - Daily temperature"); + Write_Labels("Time (hours:mins)", "Temperature (degC)", "@frPLplot Example 29 - Daily temperature"); Set_Pen_Color(Aquamarine); Draw_Curve(x, y); + + Set_Pen_Color(Yellow); + Draw_Error_Bars_X(xerr1, xerr2, y); + Set_Pen_Color(Green); + Draw_Error_Bars_Y(x, yerr1, yerr2); + + -- Rescale major / minor tick marks back to default + Set_Minor_Tick_Length(0.0, 1.0); + Set_Major_Tick_Length(0.0, 1.0); end plot1; @@ -105,13 +141,15 @@ -- Set time format to be abbreviated month name followed by day of month Set_Date_Time_Label_Format("%b %d"); + Set_Numeric_Label_Precision(True, 1); Set_Environment(xmin, xmax, ymin, ymax, 0, 40); Set_Pen_Color(Green); - Write_Labels("Date", "Hours of daylight", "#frPLplot Example 29 - Hours of daylight at 51.5N"); - + Write_Labels("Date", "Hours of daylight", "@frPLplot Example 29 - Hours of daylight at 51.5N"); Set_Pen_Color(Aquamarine); Draw_Curve(x, y); + + Set_Numeric_Label_Precision(False, 0); end plot2; @@ -121,9 +159,17 @@ begin -- Find the number of seconds since January 1, 1970 to December 1, 2005. -- Should be 1_133_395_200.0. - -- This method does not work reliably for timezones which were - -- on daylight saving time on Janary 1 1970, e.g. the UK. + + -- NOTE that some PLplot developers claim that the Time_Of function + -- is incorrect, saying that this method does not work reliably for + -- time zones which were on daylight saving time on Janary 1 1970, e.g. + -- the UK. However, there is confusion over the C and/or Unix + -- time functions which apparently refer to local time: Time_Of does + -- not refer to local time. The following commented-out line which + -- calculates xmin returns 1133395200.0 which is identical to the + -- PLplot-developer-agreed-to value which is hard-coded here. Go figure. -- xmin := Long_Float(Time_Of(2005, 12, 1, 0.0) - Time_Of(1970, 1, 1, 0.0)); + -- For now we will just hard code it xmin := 1133395200.0; @@ -153,10 +199,12 @@ Box_Around_Viewport("bcnstd", 14.0 * 24.0 * 60.0 * 60.0, 14, "bcnstv", 1.0, 4); Set_Pen_Color(Green); - Write_Labels("Date", "Hours of television watched", "#frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); - + Write_Labels("Date", "Hours of television watched", "@frPLplot Example 29 - Hours of television watched in Dec 2005 / Jan 2006"); Set_Pen_Color(Aquamarine); + -- Rescale symbol size (used by Draw_Points) by 0.5 + Set_Symbol_Size(0.0,0.5); + Draw_Points(x, y, 2); Draw_Curve(x, y); @@ -166,6 +214,9 @@ -- Parse command line arguments Parse_Command_Line_Arguments(Parse_Full); + -- Change the escape character to a '@' instead of the default '#' + Set_Escape_Character('@'); + -- Initialize plplot Initialize_PLplot; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |