[Scilab-Dev] plotframe obsoleted

Stéphane Mottelet stephane.mottelet at utc.fr
Mon Jun 30 09:19:19 CEST 2008


François Vogel a écrit :
> mottelet at dma.utc.fr said on 28/06/2008 10:57:
>> maybe you can create an empty axes and then turn on everything
>> at hand
>
> Yes, this is working, thanks.
>
>> Now I am an expert of the new graphics :-) (I've almost
>> finsished porting the plotlib).
>
> Just for my education, why is the plotlib still needed with the 
> current Scilab5 graphics?
>
> I have used it extensively from Scilab 2.7 to Scilab 4. Shame on me, I 
> never took the time to thank you for having made it available, so 
> let's state it now: this saved me a LOT of time in the past, many thanks.
>
> I'm now in the process of converting my scripts so that they can work 
> with Scilab 5 and the new graphics. This is... well, not so easy due 
> to numerous graphics bugs (but IMO this is largely due to java, not 
> the new graphics scheme itself). However I must admit that, once 
> you've bought your driving license, new graphics are easier/clearer to 
> use than the old graphics. I've been using the plotlib mainly because 
> I could not achieve what I wanted with the old graphics. With the new 
> graphics any calls to the plotlib have found a Scilab-only 
> replacement. Just wondering.
>
> Francois
You are (mostly) right, but, like a (dead) friend  of mine used to say : 
the devil is in the details. The new
"object-oriented" structure was missing in the old graphics and I have 
to say that porting the plotlib
has been sometimes just replacing numerous lines of code by one line or 
even nothing at all.

Some reasons for which the plotlib is still needed (at least for my own 
usage) :

-In Scilab, having default colors, e.g. obtained in a default entity 
handle like gda()
given by indices making only sense with respect to a default colormap of the
default entity gdf(), is (to me) completely useless once you need to 
plot nice
shaded plots and still control the colors of line plots, foreground, 
background...
What it really still missing is a decent colormap handling. Having one 
colormap for the whole figure is
a real problem when you have shaded  plots (like pcolor, surf,...)  
together with line plots. In the
plotlib the colormap for shaded objects is handled separately. This also 
allows to have a "caxis"
macro like in Matlab.
The big deal is, in fact, when will Scilab switch to truecolor ?

-Another point : legends and colorbars are in no way linked to  the axes 
they belong to. For
example, once you have plotted the legend, you can do it again and 
again, the new entity
will never replace the previous one. Legends should be handled like 
(x,y,z) labels and title.
Of course, this is only needed for people using Scilab like a calculator 
(i.e. writing a lot
of stuff directly on the command line)... but there are still many ! 
Same thing for
the colorbar.

-Last point, many users have complained about XMLlab using the old 
graphics; I thought
it was easier for me to port the plotlib instead of modifying the XSL 
stylesheets to generate  all
the needed stuff. I was right. But this adds additionnal bottlenecks, 
and as a result everything is
slower than before. Hopefully it is possible to speed up things, e.g. by 
directly modifying
the "data" field in order to make fast animations.

S.


-- 
Stéphane Mottelet
Laboratoire de Mathématiques Appliquées
Université de Technologie de Compiègne
http://www.lmac.utc.fr/~mottelet




More information about the dev mailing list