Re: [Scilab-users] plot2d3()

2021-05-02 Thread Federico Miyara


Christophe:

Thank you for making me aware of xpolys(), a new addition to my bag of
tools.

A good alternative workaround.

Regards,

Federico Miyara



On 26/04/2021 04:42, Dang Ngoc Chan, Christophe wrote:

Hello,


De : fmiyara
I'm trying to get a plot like this:

[...]

Maybe you should try with xpolys(), e.g.

--

[n, ybase] = (10, -12);

y = ybase + 9*grand(1,n,"def");

x=1:n;

Y=[y ; ybase*ones(y)];

X=[x ; x]

scf(0);

clf();

xpolys(X, Y, ones(y));

plot(x, y, "o");

gcf().children.data_bounds(1, 2) = ybase;

--

But it mays have some drawbacks.

HTH


--
Christophe Dang Ngoc Chan
Mechanical calculation engineer


General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





--
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] plot2d3()

2021-04-28 Thread Federico Miyara


Samuel,





Nice plot (a Power Spectrum Density after applying an open window()..?
:-))



Actually, it is the FFT of a short tone burst (completely open, boxcar
window :) ) with thrice its length zero-padding



I see two issues with this trial:

  * setting y_ticks labels by hand cancels the auto_ticking mode for
ordinates, if we resize the graphic window
  * The y value on datatips becomes wrong



This is true, I just needed it to export once to SVG so I ensured the
desired size before actually running the workaround (which, by the way I
mproved to avoid having to enter the values by hand)


In the meantime, here is another possible workaround, that is both
auto_ticking and with correct datatiped values:
// Raw data [n,  ybase]  =  (10,  -12);
y  =  ybase  +  9*grand(1,n,"def");
// Actual data y  =  [ybase*ones(y);  y  ;  ybase*ones(y)];
x  =  (1:n)  .*.  [1  1  1];
// Plotting clf,  plot(x(:),  y(:),  "-o")
set(gce().children,  "mark_stride",3,  "mark_offset",1);



This seems a very good workaround! Probably it would be better if
drawing first the lines and then the circles only for the original data.

Thanks!

Federico


--
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] plot2d3()

2021-04-26 Thread Dang Ngoc Chan, Christophe
Hello,

> De : fmiyara
> I'm trying to get a plot like this:

[...]

Maybe you should try with xpolys(), e.g.

--

[n, ybase] = (10, -12);

y = ybase + 9*grand(1,n,"def");

x=1:n;

Y=[y ; ybase*ones(y)];

X=[x ; x]

scf(0);

clf();

xpolys(X, Y, ones(y));

plot(x, y, "o");

gcf().children.data_bounds(1, 2) = ybase;

--

But it mays have some drawbacks.

HTH


--
Christophe Dang Ngoc Chan
Mechanical calculation engineer


General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] plot2d3()

2021-04-24 Thread Samuel Gougeon

Le 12/04/2021 à 07:39, Federico Miyara a écrit :


Dear All,

I'm trying to get a plot like this:



Nice plot (a Power Spectrum Density after applying an open window()..? :-))


where I intend to get a line plot where the lines come from the bottom 
of the plot instead of coming from 0 as is the normal way using 
plot2d3().


To get this with plot2d3() I had to plot the y axis data + 50 in order 
to make the botom of the plot coincident with 0, and then fake the 
labels using



gca()..y_ticks.labels = 
["-50","-45","-40","-35","-30","-25","-20","-15","-10","-5","0","5","10"]';



To get the circles I had to use plot() with "o" as third argument 
since plot2d3() doesn't accept it.


Is there a more direct way to get such result

Is a there some way of achieving this in a more tative way?



Good question!
I see two issues with this trial:

 * setting y_ticks labels by hand cancels the auto_ticking mode for
   ordinates, if we resize the graphic window
 * The y value on datatips becomes wrong

There could be a solution using gca().ticks_st(:,2), but... 
gca().ticks_st does not work  (no 
workaround found to make it working).

When this will be fixed, the following code could be tested:

[n,  ybase]  =  (10,  -12);
y  =  ybase  +  9*grand(1,n,"def");
clf,  plot(y(:),  "-o")
set(gce().children,  "polyline_style",3,  "line_mode","off");
gca().axes_reverse(2)  =  "on";
gca().ticks_st(:, 2)  =  [-1;-14];

It should set correct -- and auto_ticked -- y values, with lines 
starting from the bottom.
But i wonder if default datatips take the .ticks_st property into 
account to display correct values.


In the meantime, here is another possible workaround, that is both 
auto_ticking and with correct datatiped values:


// Raw data [n,  ybase]  =  (10,  -12);
y  =  ybase  +  9*grand(1,n,"def");
// Actual data y  =  [ybase*ones(y);  y  ;  ybase*ones(y)];
x  =  (1:n)  .*.  [1  1  1];
// Plotting clf,  plot(x(:),  y(:),  "-o")
set(gce().children,  "mark_stride",3,  "mark_offset",1);

Regards
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] plot2d3()

2021-04-12 Thread CRETE Denis
Hello ,
What about using « errbar » function, something like errbar(x,y 50+y, 0) ?
HTH
Denis

De : users  De la part de Federico Miyara
Envoyé : lundi 12 avril 2021 07:40
À : Users mailing list for Scilab 
Objet : [Scilab-users] plot2d3()


Dear All,

I'm trying to get a plot like this:
[cid:image001.jpg@01D72F77.52FA2D60]
where I intend to get a line plot where the lines come from the bottom of the 
plot instead of coming from 0 as is the normal way using plot2d3().

To get this with plot2d3() I had to plot the y axis data + 50 in order to make 
the botom of the plot coincident with 0, and then fake the labels using


gca()..y_ticks.labels = 
["-50","-45","-40","-35","-30","-25","-20","-15","-10","-5","0","5","10"]';


To get the circles I had to use plot() with "o" as third argument since 
plot2d3() doesn't accept it.

Is there a more direct way to get such result

Is a there some way of achieving this in a more tative way?

Thanks!

Regards,

Federico Miyara

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>

Libre de virus. 
www.avast.com<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] plot2d3()

2021-04-11 Thread Federico Miyara


Dear All,

I'm trying to get a plot like this:

where I intend to get a line plot where the lines come from the bottom
of the plot instead of coming from 0 as is the normal way using plot2d3().

To get this with plot2d3() I had to plot the y axis data + 50 in order
to make the botom of the plot coincident with 0, and then fake the
labels using


gca()..y_ticks.labels =
["-50","-45","-40","-35","-30","-25","-20","-15","-10","-5","0","5","10"]';


To get the circles I had to use plot() with "o" as third argument since
plot2d3() doesn't accept it.

Is there a more direct way to get such result

Is a there some way of achieving this in a more tative way?

Thanks!

Regards,

Federico Miyara



--
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users