[Scilab-users] Fwd: plotxxyyy

Frieder Nikolaisen Frieder.Nikolaisen at student.hs-rm.de
Wed Oct 12 10:52:53 CEST 2016


 

Hello, 

thank you for all the feedback and help. It's really great.


I used the idea of Jens Simon Strom combined with some help from last
week: 

//Datensätze 
x1 = (A(:,1) - A(1,1)) * 24 * 3600;
y1 =
A(:,y_1);
y2 = A(:,y_2);
y3 = A(:,y_3);
drawlater()

subplot(3, 1, 1)
co
= color("green"); 
plot2d(x1, y1, co);
a = gca();
b.font_color = co;

a.foreground = co;
ylabel(string(kT(y_1)),"color",co)
a.x_location =
'top';

subplot(3, 1, 2)
co = color("blue"); 
plot2d(x1, y2, co);
b =
gca();
b.font_color = co; 
b.foreground =
co;
ylabel(string(kT(y_2)),"color",co)
b.axes_visible(1) = "off";

//b.marings = [0.1 0.1 0.3 0.5]; 
//b.filled = "off"; 
subplot(3, 1,
3)
co=color("red");
plot2d(x1, y3, co); 
c = gca(); 
c.font_color = co;

c.foreground = co; 
//c.axes_visible(1) = "off";

ylabel(string(kT(y_3)),"color",co)
//xlabel(string('Zeit [Sekunden]'),
co)
x= (A(:,1) - A(1,1)) * 24 * 3600;
for k=1:A_size(1,1)
//Beschriftung
xstring(x(k),x(1),string(k)) // x(1) always 0
//
xstring(x,y,str,[angle,[box]])
disp(x(1))
end
//c.marings = [0.1 0.1 0.5
0.3]; 
//c.filled = "off"; 

drawnow()

The printed plots are attached.
I did plot different paramters, as I can choose then in my GUI.

That
works well: 

 	* Three plots, having the same x axis. 
 	* x axis on
the top and bottom
 	* Line NUMBERS FITTING THE X AXIS. 

That does not
work: 

 	* showing a FEW LINE NUMBERS only, for reading (best case:
Fitting the automatic shown times in sec

 Problem: I cannot tell, how
many datapoints there are going to be. So it mus be choosen automaticly.


Best regards 

Frieder 

On 2016-10-11 21:04, Samuel Gougeon wrote:


> Hello,
> 
> Le 11/10/2016 14:46, Rafael Guerra a écrit : 
> 
>> Hi,

>> 
>> I was not able to follow the whole discussion
> Neither did i,
>

>> but concerning your subplot challenge: "_… I cannot add a second
x-axis in a subplot by newaxis(). How to add a x-axis by using
subplot?_" and your last example, 
>> 
>> Couldn't you add a 4th subplot
at the bottom in order to plot the 2ndx-axis (say by plotting only
zeros)?
> .
> Why not using drawaxis() as already suggested? drawaxis()
is made for this kind of situation.
> In this thread, no logarithmic
axis is involved. So i do to catch the reason of ignoring drawaxis().
>

> By the way, IMO, a drawing of what exactly is required would be
clearer than hundred of lines of description, with schematic curves,
axes, arrows linking curves to their multiple axes in x and y.
> 
> BR
>
Samuel Gougeon

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161012/d32b29fc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subplot_with_line_number_1.gif
Type: image/gif
Size: 7918 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20161012/d32b29fc/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subplot_with_line_number_2.gif
Type: image/gif
Size: 9522 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20161012/d32b29fc/attachment-0001.gif>


More information about the users mailing list