Thanks Christophe:

Le 30/03/2015 17:31, Dang, Christophe a écrit :
Brought back to the list so everybody can contribute

--------------------------------------------------------------------------------
De : [email protected] [mailto:[email protected]]
Envoyé : lundi 30 mars 2015 15:50
À : Dang, Christophe
Objet : R: RE: [Scilab-users] Issue with graphic interface

Yes, I'm using a GUI that perform operations on data and then displays the 
curve related to the processed data on a 2D plot.
The steps are very simple:

1) Load data files
2) Perform some operations on the data
3) Display the results on a 2D plot

At this stage of the process everything is fine and well formatted (since I set 
the properties of the figure and of the axis)

Now, It is useful however to compare different curves obtained with different 
data.
So I just repeat steps 1),2) and 3) in order to have a second plot on a 
different figure. When I copy and paste one curve (with the legend properly
formatted) in the box of the other curve I have to update the legend (and this 
is fine, for example in Matlab I usually do so). In order to update the legend 
I do the following operations

4) right click on one curve
5) "insert legend"
6) type the name of the curve

The fact that I don't understand is why when I update the legend (after step
6) the box of the legend (that has been set to be "white" in each of the two
figures) becomes transparent so that you can see the grid passing through the 
legend and making the legend itself not very clear to read.

Thanks for your help
Here is the complete way to reproduce and identify the 2 bugs:

clf
subplot(2,1,1)
plot2d()
xgrid()
legend("1","2","3")
subplot(2,1,2)
plot(-1:1)
legend("1")
xgrid()  // the legend background is opaque. It clips the grid

// click right on the green curve above: select COPY
// go to the bottom axes, and paste the curve
// See the Legend handle:
ax  =  gca();
ax.children(2)
// It is 2nd position since the copied curve has been inserted afterwards (as 
children(1))

// Then, to update the legend, still for the bottom axes,
// - click right on the green curve: select Legends =>  Insert, and type"Test"
// =>  Here, the legend's background becomes transparent and lets the grid 
appearing.
// Why? Look at the axes children:
ax.children
// The legend block is now children(1), and its fill_mode is"off".


So: There are here 2 bugs:
a) the legends handle should not change
b) the fill_mode should not be set to "off". By the way, the default is conveniently to "on". So it is not a default's issue.

David, could you fill a bug report (i guess, only one)?

Samuel

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to