On Jul 23, 2009, at 1:25 AM, Alain Baeckeroot wrote:

> Dear all
>
> i 'd like to create my function for drawing the legend of graph,
> i want to modify line width for the legend, and font color and reset
> to previous value before exiting the legend function. so i need to  
> know
> current line width, line color
>
> I found no function that gives me this informations (no plg...)
> Am i wrong ?
> how could i get this information ?
>
> Regards
> Alain baeckeroot
>

Hi Alain,

PLplot has more "setter" functions than "getter" functions which can  
be problematic as you have found. The Ada bindings augment the PLplot  
API with a snapshot facility for color map 0. You might find this  
useful--search plplot_traditional.ads and plplot_traditional.adb for  
the string "snapshot". With this, you can preserve the state of color  
map 0 at any time and restore it later after having made changes. In  
addition, the default state of color map 0 is available at all times  
(in Ada). Perhaps you can borrow from this code to use in Octave.

As for preserving the pen width, you might have to set it specifically  
to your own width and then remember that globally so that you can  
reset it later. This sounds like the wrapper idea of Hazen's. I'm sure  
that you noticed the inconsistency with the name of the function to  
set pen width, plwid instead of plswid as is conventional with other  
setter functions. (And no plgwid.)

Hope this helps.

Jerry



Ada sources in SVN (beware line wrap):

http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/bindings/ada/plplot_traditional.ads.cmake?revision=9999&view=markup

http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/bindings/ada/plplot_traditional.adb.cmake?revision=9378&view=markup


------------------------------------------------------------------------------
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to