Re: [Plplot-devel] Legends

2010-10-06 Thread Schwab,Wilhelm K
Dave,

I'm content to be voted down on this, but a performance argument is a stretch: 
how can one possibly fit enough legend text on a graph to cause a CPU any 
stress at all?  The first real use I made of PLplot was to plot 500,000 sample 
time series; copying a few hundred bytes (max) of text will not make a bit of 
difference by comparison.

Bill



From: David MacMahon [dav...@astro.berkeley.edu]
Sent: Wednesday, October 06, 2010 12:59 AM
To: Alan W. Irwin
Cc: Schwab,Wilhelm K; Plplot-devel@lists.sourceforge.net
Subject: Re: [Plplot-devel] Legends

On Oct 5, 2010, at 21:42 , Alan W. Irwin wrote:

 On 2010-10-05 22:19-0400 Schwab,Wilhelm K wrote:

 I was interested in building it (5.9.7) to try the legend code.
 Is there a reason for the double pointer?  It seems that

   this part\0that part\0...\0and the last part\0\0

 would do the job just as easily??

 I am willing to keep an open mind about changing the
 present approach if we run into trouble interfacing const char **
 text to
 other languages.

FWIW, I vote for keeping it as char**.  For the smallish amounts of
legend text it probably doesn't matter that much either way, but with
more and/or larger strings that might come from different locations,
the cost of copying into one buffer can become significant.  Creating
an array of char* and populating with pointers into a long buffer
containing back-to-back strings is not nearly so onerous (presuming
you know how many strings you have to begin with so you can allocate
a big enough char* array).

Does the library strdup the passed in strings, render them before
returning, or just copy the pointers for later rendering?

Thanks,
Dave (who has obviously not examined the legend implementation!)


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Legends

2010-10-06 Thread David MacMahon
Hi, Bill,

On Oct 6, 2010, at 8:19 , Schwab,Wilhelm K wrote:

 a performance argument is a stretch

I agree, that's why I prefaced my comments with...

 For the smallish amounts of
 legend text it probably doesn't matter that much either way

Since plotting is inherently much more number-heavy than text-heavy,  
this may never be an issue for plplot.  On the other hand, if it ever  
did arise, it would be nice to have a single unified approach for  
passing an array of strings instead of two different ways.

Another argument for keeping it char ** would be inertia.  It's  
already written this way (designer's choice) so don't change it  
unless there is a compelling reason.

Dave


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Greek characters in qt-driver

2010-10-06 Thread Alan W. Irwin
On 2010-10-05 15:18-0700 Alan W. Irwin wrote:

 Note also these Greek-letter variations are all available in the same
 font.  So it is not a matter of suddenly changing fonts in the middle
 of a string. Instead, it is using the same font with different Hershey
 and therefore UCS4 indices representing different variant forms of
 Greek letters depending upon what the user wants to do.

Hi Steve:

Having slept on this, the lesson I take away from this is I should
always mention any changes in the Hershey to unicode transformation
table and the implications of that in the release notes.  But
hopefully I have nailed it now and there will be no more such changes.
Furthermore, I think your best workaround is not to fiddle with the
Hershey to unicode transformation yourself (since that implies you
would have to patch PLplot indefinitely), and instead let your users
know there have been some changes in the Hershey to unicode
transformation table, and they should look at example 7 results at
http://plplot.sourceforge.net/examples.php?demo=07 (which is the cairo
result) or run example 7 with -dev qtwidget for themselves for
guidance about which Hershey indices to use.

I have also thought a bit more about the planned plglyph argument
list, and I have decided the last argument should be a text string
like that used in plptex rather than a UCS4 index.  IOW, plglyph would
be a simple wrapper for repeat calls to plptex for each element of the
x and y arrays.  The advantage of this approach is it gives the user
great flexibility in specifying the glyph and font following all the
many different methods in
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.7/characters.html.
It also allows the user to specify more than one glyph in the string
to be plotted at each of the x, y points if they wanted that, but that
would be an extremely unusual use case.

Because of this proposed change in the argument list, the planned
plglyph should make accessible all the glyphs available from plpoin
(except for the special code=-1 point glyph which I doubt is used
very much because it might be problematic for some devices and because
our DocBook documentation does not mention this capability), all the
glyphs available from plsym, and all the huge number of glyphs (a
million of them?) that gucharmap shows are available on your system.

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
__

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel