Re: [Plplot-devel] D bindings (nearly finished) and tests on Mac OS X

2009-08-26 Thread Arjen Markus
Hi Andrew,

I will look into it. I can probably find the time.

Regards,

Arjen

On 2009-08-25 16:55, Andrew Ross wrote:
 On Tue, Aug 25, 2009 at 03:28:02PM +0200, Arjen Markus wrote:
 Hi Andrew,

 I had forgotten about that function. Yes, we can use it. The
 documentation is pretty clear about its use.

 Regards,

 Arjen
 
 I've done that. I get the same results as before. It may be we need
 to add set ::tcl_precision to some examples though. 
 
 The only other remaining tcl item is implementing plslabelfunc. Arjen, 
 any chance you will get to look at this pre-release? If not I will 
 try and find time, but it is a little beyond my small tcl knowledge.
 
 Andrew
 
 

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.





--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Java tests on Mac OS X fail

2009-08-26 Thread Werner Smekal
Hi Andrew,


 Werner,

 From what you have said this looks like a problem with the plcont
 routine. This uses a common block to share the transform data between
 plplot and the user code. From what is being plotted I think this
 is not being properly shared. There is some comment magic to import /
 export this for some compilers. Can you confirm which fortran compiler
 you are using? Do you have any idea if there are any special pragmas
 required for exporting common blocks on this compiler?

The compiler is gfortran (it's used for f77 and f95)

GNU Fortran (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

I can't remember where I downloaded it from and I'm not sure, which  
gfortran compiler I should get for Mac OS X to update the compiler.

Regards,
Werner


 This is all a bit of a kludge to fix up for not using function  
 pointers
 in fortran. In fact we've now worked out how to do this properly (see
 e.g example 19 with mapform). How do people feel about fixing the pltr
 functions properly for fortran? This probably requires working out
 what to do with PLPointer data. It would be nice if we could get all
 languages working the same.

 Andrew

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
 30-Day
 trial. Simplify your report design, integration and deployment - and  
 focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Plplot-devel mailing list
 Plplot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/plplot-devel

--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Java tests on Mac OS X fail

2009-08-26 Thread Arjen Markus
Hi Werner,

you will find an up-to-date one at: http://gcc.gnu.org/wiki/GFortranBinaries

Regards,

Arjen

On 2009-08-26 09:21, Werner Smekal wrote:
 
 The compiler is gfortran (it's used for f77 and f95)
 
 GNU Fortran (GCC) 4.2.3
 Copyright (C) 2007 Free Software Foundation, Inc.
 
 GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
 You may redistribute copies of GNU Fortran
 under the terms of the GNU General Public License.
 For more information about these matters, see the file named COPYING
 
 I can't remember where I downloaded it from and I'm not sure, which  
 gfortran compiler I should get for Mac OS X to update the compiler.
 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] [PATCH] Compiler warning fixes

2009-08-26 Thread Mark de Wever

Hi,

The attached patches fix some compiler warnings:
plargs-patch Make sure the functions return a value.
cairo-patch Properly place parentheses, avoiding code having no effect.

I also noticed with gcc -Wall there are a lot of unused variables in 
plplot, if wanted I could provide a patch which removes those variables.


Regards,
Mark de Wever
Index: src/plargs.c
===
--- src/plargs.c(revision 10343)
+++ src/plargs.c(working copy)
@@ -2259,6 +2259,7 @@
 opt_cmap0(const char *opt, const char *optarg, void *client_data)
 {
   plspal0(optarg);
+  return 0;
 }
 
 /*--*\
@@ -2271,4 +2272,5 @@
 opt_cmap1(const char *opt, const char *optarg, void *client_data)
 {
   plspal1(optarg, TRUE);
+  return 0;
 }
Index: drivers/cairo.c
===
--- drivers/cairo.c (revision 10343)
+++ drivers/cairo.c (working copy)
@@ -540,7 +540,7 @@
strncat(aStream-pangoMarkupString, #38;, 
MAX_MARKUP_LEN-1-strlen(aStream-pangoMarkupString));
break;
   case 60:
-   strncat(aStream-pangoMarkupString, #60;, 
MAX_MARKUP_LEN)-1-strlen(aStream-pangoMarkupString);
+   strncat(aStream-pangoMarkupString, #60;, 
MAX_MARKUP_LEN-1-strlen(aStream-pangoMarkupString));
break;
   case 62:
strncat(aStream-pangoMarkupString, #62;, 
MAX_MARKUP_LEN-1-strlen(aStream-pangoMarkupString));
@@ -831,7 +831,7 @@
strncat(pangoMarkupString, #38;, 
MAX_MARKUP_LEN-1-strlen(pangoMarkupString));
break;
  case 60:
-   strncat(pangoMarkupString, #60;, 
MAX_MARKUP_LEN)-1-strlen(pangoMarkupString);
+   strncat(pangoMarkupString, #60;, 
MAX_MARKUP_LEN-1-strlen(pangoMarkupString));
break;
  case 62:
strncat(pangoMarkupString, #62;, 
MAX_MARKUP_LEN-1-strlen(pangoMarkupString));
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] [ plplot-Bugs-2844850 ] version check for PDL perl module needs to be smarter

2009-08-26 Thread SourceForge.net
Bugs item #2844850, was opened at 2009-08-26 06:24
Message generated for change (Tracker Item Submitted) made by alexl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=102915aid=2844850group_id=2915

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alex Lancaster (alexl)
Assigned to: Nobody/Anonymous (nobody)
Summary: version check for PDL perl module needs to be smarter

Initial Comment:
The current version of the perl package PDL that plplot depends on is 
2.4.4_05, unfortunately the version checker in plplot isn't smart enough to 
recognize that this is greater than the minimum version of 2.4.1:

-- PDL_VERSION = 2.4.4_05
-- WARNING: PDL version  2.4.1. Disabling Perl/PDL examples in tests

See the downstream Fedora bug: 
https://bugzilla.redhat.com/show_bug.cgi?id=519357

with a link to the full build log.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=102915aid=2844850group_id=2915

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [PATCH] Compiler warning fixes

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 11:12+0200 Mark de Wever wrote:

 Hi,

 The attached patches fix some compiler warnings:
 plargs-patch Make sure the functions return a value.
 cairo-patch Properly place parentheses, avoiding code having no effect.

Thanks, Mark.  I committed your plargs-patch and Hazen committed your
cairo-patch.  Good spotting on that last one!  I double-checked the many
other strncat calls within cairo.c, and it appears you found all the bad
ones.


 I also noticed with gcc -Wall there are a lot of unused variables in plplot, 
 if wanted I could provide a patch which removes those variables.

Yes, please.

Alan

__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] plssubmem patch

2009-08-26 Thread David Gillard
I've submitted a patch to the source code via the patches tracker, under the 
name 'plssubmem function'. 

The patch incorporates is for the addition of a plssubmem function similar to 
plsmem except that it takes parameters specifying a subregion of the memory 
region to plot to. Clipping is handled in the case where the subregion falls 
outside the allocated memory. 

The major modification is to the mem driver. Other pl functions are not 
impacted. 

-- 
David Gillard, BA, BSc 
Software Developer 
Pangeo Subsea 
www.pangeosubsea.com 
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Qt driver update

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 10:01+0100 Rochel, Alban wrote:

 You will find attached a patch for the Qt driver.

It applies and builds without errors and the speedup in -dev qtwidget for
animations like example 17 is extraordinary.  I also get a x17c -dev
qtwidget time that is comparable with the -dev xwin one.

If I try

./qt_example -bg ff

I do get the specified white background to the GUI.

However, I also get the error message

QColor::setNamedColor: Unknown color name 'ff'

Can that error message be suppressed or are we stuck with it?

That's the last qt issue (and an extremely minor one at that) that I am aware
of on Linux.

Thanks very much for all your efforts to make the qt devices some of the
best that we have on Linux, and I am sure that with some additional work
(especially with lots of test reports from our developers to help you narrow
down the issues) the same will be true on Mac OS X and Windows.

I have committed your patch as revision 10346.  I am really happy to see
this go in before our release.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [ plplot-Bugs-2844850 ] version check for PDL perl module needs to be smarter

2009-08-26 Thread Orion Poplawski
On 08/26/2009 09:06 AM, Alan W. Irwin wrote:
 This issue has been fixed for some time in svn trunk (Orion please
 double-check that) so I have closed this bug with the appropriate message.


Sorry for the delay.  Yes it fixes it.  Thanks!

-- 
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] test_octave.sh.in indentation fix

2009-08-26 Thread Orion Poplawski
While trying to debug the octave problems, the indentation of 
test_octave.sh was driving my crazy.  Here's a fix.  Not sure what the 
current plplot indent standard is.


--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com
Index: test_octave.sh.in
===
--- test_octave.sh.in	(revision 10346)
+++ test_octave.sh.in	(working copy)
@@ -37,50 +37,50 @@
 
 # Check verbose_test variable
 if (strcmp(getenv(verbose_test),on) == 1)
-verbose_test = 1;
+verbose_test = 1;
 else
 verbose_test = 0;
-endif
+endif
 
-plplot_stub;
-t = split($options, -); 
-if (t); t(1,:)=; endif;
-	for i=1:rows(t)
-	tt = deblank (t(i,:)); len = length(tt);
-	ix = index(tt, );
-	if (ix == 0); ix = len; len = 0; endif
-	plsetopt(tt(1:ix), tt(ix+1:len));
-	endfor
+plplot_stub;
+t = split($options, -); 
+if (t); t(1,:)=; endif;
+for i=1:rows(t)
+tt = deblank (t(i,:)); len = length(tt);
+ix = index(tt, );
+if (ix == 0); ix = len; len = 0; endif
+plsetopt(tt(1:ix), tt(ix+1:len));
+endfor
 
 # p7 works OK with plmeta, e.g., but not ps or psc. pleop/plbop issue?
+for i=[1:7 8 9 13 15 16 21] ;
+if (verbose_test)
+	printf(p%d\n,i);
+endif
+figure(i,$device,sprintf(${OUTPUT_DIR}/p%d%%n.$dsuffix,i));
+feval(sprintf(p%d,i))
+closefig
+endfor
 
-	for i=[1:7 8 9 13 15 16 21] ;
-	if (verbose_test)
-		printf(p%d\n,i);
-		endif
-		figure(i,$device,sprintf(${OUTPUT_DIR}/p%d%%n.$dsuffix,i));
-		feval(sprintf(p%d,i))
-		closefig
-		endfor
 #plot equivalent of x??c examples.  These only required octave-2.0.x
 #Example 19 is not implemented
 #(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: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);
-		endif
-		t = split($options, -); 
-if (t) ; t(1,:)=; endif
-		for j=1:rows(t)
-		tt = deblank (t(j,:)); len = length(tt);
-		ix = index(tt, );
-		if (ix == 0); ix = len; len = 0; endif
-			plSetOpt(deblank(tt(1:ix)), tt(ix:len));
+failed = [] ;
+for i=[1: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);
+endif
+t = split($options, -); 
+if (t) ; t(1,:)=; endif
+for j=1:rows(t)
+	tt = deblank (t(j,:)); len = length(tt);
+	ix = index(tt, );
+	if (ix == 0); ix = len; len = 0; endif
+	plSetOpt(deblank(tt(1:ix)), tt(ix:len));
 endfor
 device=$device;
 plSetOpt(dev, device);
@@ -89,7 +89,7 @@
 file = sprintf(${OUTPUT_DIR}/x%.2d${lang}%%n.$dsuffix,i);
 plSetOpt(o, file);
 if i == 14  
-  file2 = sprintf(${OUTPUT_DIR}/x%.2da${lang}.${dsuffix},i);
+	file2 = sprintf(${OUTPUT_DIR}/x%.2da${lang}.${dsuffix},i);
 endif
 eval(cmd, failed = [failed, i] ;);
 fclose(strm);
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] RE : Qt driver update

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 17:11+0100 Rochel, Alban wrote:

 The error message (or rather warning) is due to the QApplication trying to
process the -bg argument, which is among the accepted arguments for a
QApplication (try qt_example -bg red for instance). There is obviously a
conflict, but nothing that would stop the software to work, so it is a
choice for the developer to filter out or not the -bg arguments or make
them available to either QApplication or the widget. Maybe we should add a
comment there?

I have fixed this issue in revision 10347.  I set argc (but not Argc) to 1
so that QApplication sees only an empty command line (other than the
command, itself).

I prefer the simplicity of this approach for our qt_example, and I assume
most Qt/PLplot GUI application developers will stick with that model where
the command-line options are completely ignored by Qt and only interpreted
by PLplot.  However, I put additional commentary in so that if application
developers want to allow both Qt options and PLplot options (say by
splitting the two kinds of options by a special -- option like startx does
for its two kinds of options), and putting one kind into argc for
QApplication and the other kind into Argc for PLplot, it should be
straightforward for them to do so.

We are now down to zero qt issues on Linux that I am aware of.  :-)

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] octave 3.2 support

2009-08-26 Thread Orion Poplawski

On 08/20/2009 03:37 PM, Orion Poplawski wrote:

I'm trying to get plplot 5.9.4 to build under Fedora Development with
octave 3.2.2 and running into some trouble. First issues appear to be
some stricter syntax checking fixed by the attached patch.

I'm now facing some segmentation fault issues running the octave
examples, but it is hindered by what may be more general issues with
octave 3.2.2 in Fedora Development. Will report back with more info when
I have it.


Things are running fine now with the following updated patch.  This adds 
a fix to example x03c.m, which seems to still work with octave 3.0.


--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com
--- plplot-5.9.4/bindings/octave/PLplot/closefig.m.octave32	2009-08-13 21:30:05.511036727 -0600
+++ plplot-5.9.4/bindings/octave/PLplot/closefig.m	2009-08-13 21:30:52.206974684 -0600
@@ -21,7 +21,7 @@
 
   global __pl
 
-  if ( !(exist __pl) || !struct_contains (__pl,inited))
+  if ( !(exist (__pl)) || !struct_contains (__pl,inited))
 return;
   endif
 
--- plplot-5.9.4/bindings/octave/demos/p4.m.octave32	2009-05-10 13:37:17.0 -0600
+++ plplot-5.9.4/bindings/octave/demos/p4.m	2009-08-13 22:50:58.068005128 -0600
@@ -21,7 +21,7 @@
   x=0.01:0.1:10;
   y=exp(x);
 
-  og = grid minor;
+  og = grid (minor);
   title(Log-log example);
   loglog(x,y,'y')
   grid (og);
--- plplot-5.9.4/bindings/octave/demos/p5.m.octave32	2009-05-10 13:37:17.0 -0600
+++ plplot-5.9.4/bindings/octave/demos/p5.m	2009-08-13 22:51:21.277975680 -0600
@@ -21,7 +21,7 @@
   x=-pi:0.01:pi;
   y=sin(x).+cos(3*x);
 
-  og = grid on;
+  og = grid (on);
   title(Polar example);
   polar(x,y,'y')
   grid (og);
--- plplot-5.9.4/bindings/octave/demos/x03c.m.octave32	2009-05-10 13:37:17.0 -0600
+++ plplot-5.9.4/bindings/octave/demos/x03c.m	2009-08-26 11:50:28.362630969 -0600
@@ -47,11 +47,11 @@
 
   plenv(-1.3, 1.3, -1.3, 1.3, 1, -2);
   for i=1:10
-x(:) = 0.1 * i * x0(:);
-y(:) = 0.1 * i * y0(:);
+x = 0.1 * i * x0(:);
+y = 0.1 * i * y0(:);
 
 ## Draw circles for polar grid */
-plline(x', y');
+plline(x, y);
   endfor
 
   plcol0(2);
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] plssubmem patch

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 13:28-0230 David Gillard wrote:

 I've submitted a patch to the source code via the patches tracker, under the
 name 'plssubmem function'.
 
 The patch incorporates is for the addition of a plssubmem function similar
 to plsmem except that it takes parameters specifying a subregion of the
 memory region to plot to. Clipping is handled in the case where the
 subregion falls outside the allocated memory.
 
 The major modification is to the mem driver. Other pl functions are not
 impacted.

Thanks, David, for your potential contribution to PLplot.

Doug, I think you should ultimately be the one to review this patch (at
http://sourceforge.net/tracker/?func=detailaid=2844452group_id=2915atid=302915)
because of your interest in the mem driver.  I am somewhat concerned about
adding another function to the core API because of the costs of propagating
that function to other languages, documenting it, and extending a standard
example (in all our languages) to use it.  Could this be implemented as a
driver option instead that is set either on the command-line or with
plsetopt?

In any case, I think we should hold off committing anything related to this
patch until after our forthcoming release which is imminent.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] Segmentation fault with qt driver

2009-08-26 Thread Hezekiah M. Carty
While testing the qtwidget and other PLplot qt output devices I ran in
to two issues.  This is on Ubuntu 9.04 64bit, with the system Qt
version (4.5.0).

The first issue is similar in feel to an long-lived, ongoing Cairo
problem - calling plinit and selecting a qt device after a call to
plend causes a segmentation fault.  Simply calling plinit(); plend();
plinit(); (selecting a qt device each time) is enough to trigger the
bug here.  I don't know if this happens for every qt device, but it
happens consistently for me with the qtwidget device.  Similar to the
Cairo bug, calling plend1 rather than plend avoids this bug.  Unlike
the Cairo bug, no text rendering is required to trigger the qt
segmentation fault.

The second issue relates to using plend1.  For example:

plsdev qtwidget;
plinit ();
plenv 0. 1. 0. 1. 1 0;
plend1 ();
plsdev qtwidget;
plinit ();
plenv 0. 1. 0. 1. 1 0;
plend1 ();

The first call to plend1 will not display a plot, just the plot window
with (on my system) a grey hatched background.  The second plend1 call
will show the plot.

I don't use the qt driver except for occasional testing, so I'm not
sure if these are PLplot bugs or bugs in some other library (for
example, Qt 4.5.0 vs a later release).

Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] What is qt4_wrap_cpp?

2009-08-26 Thread Orion Poplawski
Trying to build the current svn version, and getting:

CMake Error at include/CMakeLists.txt:123 (qt4_wrap_cpp):
   Unknown CMake command qt4_wrap_cpp.

What is supposed to provide the qt4_wrap_cpp macro?

-- 
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Segmentation fault with qt driver

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 13:48-0500 Hezekiah M. Carty wrote:

 While testing the qtwidget and other PLplot qt output devices I ran in
 to two issues.  This is on Ubuntu 9.04 64bit, with the system Qt
 version (4.5.0).

 The first issue is similar in feel to an long-lived, ongoing Cairo
 problem - calling plinit and selecting a qt device after a call to
 plend causes a segmentation fault.  Simply calling plinit(); plend();
 plinit(); (selecting a qt device each time) is enough to trigger the
 bug here.  I don't know if this happens for every qt device, but it
 happens consistently for me with the qtwidget device.  Similar to the
 Cairo bug, calling plend1 rather than plend avoids this bug.  Unlike
 the Cairo bug, no text rendering is required to trigger the qt
 segmentation fault.

 The second issue relates to using plend1.  For example:

 plsdev qtwidget;
 plinit ();
 plenv 0. 1. 0. 1. 1 0;
 plend1 ();
 plsdev qtwidget;
 plinit ();
 plenv 0. 1. 0. 1. 1 0;
 plend1 ();

 The first call to plend1 will not display a plot, just the plot window
 with (on my system) a grey hatched background.  The second plend1 call
 will show the plot.

 I don't use the qt driver except for occasional testing, so I'm not
 sure if these are PLplot bugs or bugs in some other library (for
 example, Qt 4.5.0 vs a later release).

When persistent memory management problems (segfaults, etc.) are identified
like this, I think it is important to add a simple C test routine to
demonstrate the problem so we have an exact test case to talk about since
_the symptoms_ of fundamental memory management issues can come and go
depending very much on minor programming detail variations as well as
platform, phase of the moon, etc.  IOW, relying on segfaults to tell us
about memory management issues is a first step, but valgrind is the
only way (at least on Linux) to get definitive results.

I have made such a test case in revision 10348 (which demonstrates exactly
how to add such a test for our build system).  It will build automatically
in the build tree for BUILD_TEST=ON and also automatically in the installed
examples tree.  For this particular test (plend1, then plend), all is well
even for valgrind tests of -dev qtwidget and -dev xcairo, but if that first
plend1 is replaced by plend there are huge memory management problems
revealed by valgrind for both -dev xcairo and -dev qtwidget (but not -dev
xwin or -dev psc).  This is for Qt version 4.5.1 downloaded from trolltech.

I have forgotten the exact differences between plend and plend1, but I know
the former calls the latter than does a bit more to completely close the
plplot library. I guess that bit more is causing the problems (or else the
subsequent plinit after a complete close of plplot is exposing
reinitialization bugs for both the cairo and qt devices.)

Andrew, I intend to look at this (especially the differences between plend
and plend1) a bit more, but you are our expert on memory management issues
so I hope you take a look as well.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] What is qt4_wrap_cpp?

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 14:50-0600 Orion Poplawski wrote:

 Trying to build the current svn version, and getting:

 CMake Error at include/CMakeLists.txt:123 (qt4_wrap_cpp):
   Unknown CMake command qt4_wrap_cpp.

 What is supposed to provide the qt4_wrap_cpp macro?

That is provided by cmake.

I thought it was impossible to get to that part of the CMake code with
ANY_QT_DEVICE true, but without the qt4_wrap_cpp macro defined. Obviously
there is some corner case where that strange combination is possible.

To help track down what corner case is causing this, I need complete details
from you (off list). Would you please send me the output of printenv (to get
the CMake-related environment variables) and also let me know the exact
cmake options that you specified, the cmake version, and the complete cmake
output?

TIA.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] What is qt4_wrap_cpp?

2009-08-26 Thread Alan W. Irwin
On 2009-08-26 14:50-0600 Orion Poplawski wrote:

 Trying to build the current svn version, and getting:

 CMake Error at include/CMakeLists.txt:123 (qt4_wrap_cpp):
   Unknown CMake command qt4_wrap_cpp.

Thanks for the extra information you provided off list.  It turned out
there was a bug in our build system for the case where the Qt4 development
environment was not found.  I have now fixed that (revision 10349).
Could you please try the exact same build again to make sure everything
works now for the no Qt4 case?

Once you confirm that works, you will probably want to build your Fedora
rpms in an environment where Qt4.5.x has been installed so Fedora users get
access to all the qt device goodies.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Segmentation fault with qt driver

2009-08-26 Thread Alan W. Irwin
Hi Hez:

This is mostly for you but there are some reassuring remarks for Alban here
as well.

On 2009-08-26 15:13-0700 Alan W. Irwin wrote:

 When persistent memory management problems (segfaults, etc.) are identified
 like this, I think it is important to add a simple C test routine to
 demonstrate the problem so we have an exact test case to talk about since
 _the symptoms_ of fundamental memory management issues can come and go
 depending very much on minor programming detail variations as well as
 platform, phase of the moon, etc.  IOW, relying on segfaults to tell us
 about memory management issues is a first step, but valgrind is the
 only way (at least on Linux) to get definitive results.

 I have made such a test case in revision 10348 (which demonstrates exactly
 how to add such a test for our build system).  It will build automatically
 in the build tree for BUILD_TEST=ON and also automatically in the installed
 examples tree.  For this particular test (plend1, then plend), all is well
 even for valgrind tests of -dev qtwidget and -dev xcairo, but if that first
 plend1 is replaced by plend there are huge memory management problems
 revealed by valgrind for both -dev xcairo and -dev qtwidget (but not -dev
 xwin or -dev psc).  This is for Qt version 4.5.1 downloaded from trolltech.

I have changed plend1 to plend in the test example as of revision 10350.  So
it now reads in its heart as follows:

plinit();
plenv(0., 1., 0., 1., 1, 0);
plend();
plinit();
plenv(0., 10., 0., 10., 1, 0);
plend();
exit(0);

After a cmake configuration with BUILD_TEST=ON, and make,

examples/c/test_plend -dev xcairo

now produces a segfault as I said above.  However, that same application is
valgrind clean for -dev qtwidget (and other qt devices I have tested such as
svgqt and epsqt)! I scrolled up my xterm to where I did my qt tests before,
and I definitely got a segfault before with -dev qtwidget, but this was an
original test case which was built by hand, and the cmake build system build
seems to have eliminated all memory management problems with qt (but not
cairo).  So this is an excellent illustration of my point above to use
easily reproducible results when dealing with memory management issues. :-)

Anyhow, Alban, we are back down to zero known errors for qt (with Qt4.5) on
Linux.  I suggest everybody (especially Hez who got -dev qtwidget segfaults
with his own hand-built plend/qt tests like I did) try examples/c/test_plend
for various qt devices for their Qt4 version and OS platform to make sure
all is well with that test example for qt in a platform-independent way.

I wonder how many minutes the zero known errors remark will last this
time for qt.  :-)

  I have forgotten the exact differences between plend and plend1, but I
know the former calls the latter than does a bit more to completely close
the plplot library. I guess that bit more is causing the problems (or else
the subsequent plinit after a complete close of plplot is exposing
reinitialization bugs for both the cairo and qt devices.)

Hez, I suggest you look at plend for yourself to see the really innocuous
things that are going on.  It calls plend1 for all streams, then releases
all memory associated with Hershey fonts, dynamic drivers, and static
drivers. That's basically it.  In fact, if you modify test_plend.c to
comment out the second plinit, plenv, and plend then the result is valgrind
clean for -dev xcairo. So the problem cannot have anything to do
specifically with the combined memory management of xcairo and plend alone.

plend does set lib_initialized = 0 which means pllib_init (called by plinit)
actually does something (restores the memory freed by plend and sets
lib_initialized = 1), but again this is pretty innocuous stuff.  So I doubt
very much the problem lies specifically with pllib_init, and that view is
supported by every other device driver having no troubles with revision
10350 of test_plend.c.  Thus, I would look carefully at what happens with
the cairo devices when you initialize them for a second time after memory
associated with dynamic drivers has been freed and reinitialized.

Wild guess: do the cairo devices hang on to some memory when they shouldn't
so at reinitialization time they are still pointing at the old dynamic
driver (dispatch table) memory that no longer exists because it has been
freed (and allocated again) in the plend case?  That freeing and allocation
is the most prominent difference between plend followed by plinit
versus plend1 followed by plinit.

Hez, I hope this overview of plend, plinit, and pllib_init and the knowledge
that no other device driver has problems (at least for the test_plend case),
helps you to quickly find the issue in the cairo case.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for 

[Plplot-devel] Problematic floating-point comparisions

2009-08-26 Thread Alan W. Irwin
Valery Pipin reported the following warning to me:

*** PLPLOT WARNING ***
Unrecognized cmap1 format #ff 100 0

At first glance that is impossible.  The line in question is the last
line in cmap1_default.pal, and that is just as perfectly formatted as
the other lines in that file.

However, a closer look at the code in plctrl.c showed a problematic
floating-point test for whether pos[i] (calculated from the above 100 value
by converting to double and multiplying by 0.01) was in the range from 0. to
1.  I have now fixed that test as of revision 10351 to account for small
floating-point errors in the calculation of pos[i].  Valery hasn't yet
gotten back to me, but when he does I presume he will tell me that fix
worked.

This whole issue shows how important it is to run PLplot on a large variety
of hardware with different floating point errors so that we find problematic
floating-point comparisons like what I just spotted and fixed in plctrl.c.
Anyhow, if you have access to PowerPC's, sparcstations, Dec Alphas, IBM
mainframes or other non-Intel hardware, now would be a good time to do some
thorough checking of PLplot on that hardware.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel