<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Dear Jens,</p>
<p>yes, the plot_date_16_lines.gif Show real data, but only a few lines of it.</p>
<p>For two reasons, showing the datevec isn't a good approach i asked for. Your tip to show the secounds instead of the datenumber, solved the Problem to have a readalbe time. I use a first diagramm for choosing the intervall I am going to process later on. For the choosing of the time period, I have two butooms that Show two different Diagramms. The first shows the entire time period and the scound enlargest the choosen period of time.</p>
<p>I choose the period by tiping the start and finish line number in my gui. With the secounds printed, I do not know the line number. So I have to try and print and try and print. ...</p>
<p>Why aren't the secounds the same as the line number (data Point)?</p>
<p>Because my data Looks like this:</p>
<p> </p>
<p>Zeit Distanz Geschwindigkeit 1 Drehzahl  Cv-Druck Richtung Lokbremse anlegen Lokbremse lösen Zugbremse anlegen Zugbremse lösen Kupplung betätigt Bremsen  aktiv </p>
<div>03.04.2012 08:<strong>49:20.090 </strong>46476.4940 0.00 478.61 0.53  0   0   0   1   0   0   0  <br />03.04.2012 09:<strong>42:42.120 </strong>46476.4940 0.00 1150.71 0.24  0   0   0   1   0   0   0  <br />03.04.2012 09:<strong>43:03.350 </strong>46476.4940 0.00 1059.06 0.24  0   1   0   1   0   0   0  <br />03.04.2012 09:<strong>43:03.550 </strong>46476.4940 0.00 1059.06 0.24  0   1   1   1   1   0   0  <br />03.04.2012 09:<strong>43:09.460 </strong>46476.4945 1.70 1059.06 0.24  0   1   1   1   1   0   0  </div>
<p>Translate the header: time   distance   Speed    Revolution Speed, ....</p>
<p> </p>
<p>The time period between each data Point isn't the same. Once the locomotive starts to operate, the programm does print line by line, each time a paramter changes. If the locomotive stands a few hours around, the data has a gap.</p>
<p>But I want to print on one x axis the time in Secounds (or maybe hours or days, depends on the period I have to process). On the secound x-axis, I want to print the line number. On the attached Diagramm, you see that there is a gap between secound 2000 and secound 3500. That one must to be seen in the Diagramm, but I want to know what line is secound 2000 and what line is secound 3500, to maybe chosse the time of Operation of the locomotive before These night break.</p>
<p>The question of datapoints is: They differ between a few tousand (50 000) and a few millions. The Programm must be able to operate with booth. The first Diagramm is going to Show me the entire time period of a few days. Then I have  a secound Diagramm. With the secound one, I choose by tiping the start and finsih line number in my gui, the time period of my Diagramm. Maybe one day. Then I have the data a Little big bigger, then I do choose the hours of interet. That might be just one hour. Then I do type the lines of this time period.</p>
<p>In the end, I do print the choosen time period in a new document, adding (calculating) a few more parametre like traction.  With the printed document, is for Simulation.</p>
<p> </p>
<p>My approach now is. Plotting three Diagramm abooth each other. But I cannot ad a secound x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?</p>
<p> </p>
<p>Thank you for your Support.</p>
<p>Cheers</p>
<p>Frieder</p>
<p>(my webmailing Programm changes my lettering to capalization by Default, enyoing). </p>
<p> </p>
<p> </p>
<p>How to copy the Code with the colours? </p>
<pre><span>0001</span>  <span>drawlater</span><span>(</span><span>)</span>
<span>0002</span>  
<span>0003</span>  <span>subplot</span><span>(</span><span>3</span><span>,</span> <span>1</span><span>,</span> <span>1</span><span>)</span>
<span>0004</span>  <span>co</span> <span>=</span> <span>color</span><span>(</span><span>"</span><span>green</span><span>"</span><span>)</span><span>;</span>
<span>0005</span>  <span>plot2d</span><span>(</span><span>x1</span><span>,</span> <span>y1</span><span>,</span> <span>co</span><span>)</span><span>;</span>
<span>0006</span>  <span>a</span> <span>=</span> <span>gca</span><span>(</span><span>)</span><span>;</span> 
<span>0007</span>  <span>a</span><span>.</span><span>font_color</span> <span>=</span> <span>co</span><span>;</span> 
<span>0008</span>  <span>a</span><span>.</span><span>foreground</span> <span>=</span> <span>co</span><span>;</span>
<span>0009</span>  <span>a</span><span>.</span><span>axes_visible</span><span>(</span><span>1</span><span>)</span><span>=</span> <span>"</span><span>off</span><span>"</span><span>;</span>
<span>0010</span>  <span>ylabel</span><span>(</span><span>string</span><span>(</span><span>kT</span><span>(</span><span>y_1</span><span>)</span><span>)</span><span>,</span><span>"</span><span>color</span><span>"</span><span>,</span><span>co</span><span>)</span>
<span>0011</span>  <span>//a.y_location=</span><span>"</span><span>right</span><span>"</span><span>;</span>
<span>0012</span>  <span>//a.marings = [0.1 0.1 0.1 0.7];</span>
<span>0013</span>  <span>//a.filled = </span><span>"</span><span>off</span><span>"</span><span>; </span>
<span>0014</span>  <span>subplot</span><span>(</span><span>3</span><span>,</span> <span>1</span><span>,</span> <span>2</span><span>)</span>
<span>0015</span>  <span>co</span> <span>=</span> <span>color</span><span>(</span><span>"</span><span>blue</span><span>"</span><span>)</span><span>;</span> 
<span>0016</span>  <span>plot2d</span><span>(</span><span>x1</span><span>,</span> <span>y2</span><span>,</span> <span>co</span><span>)</span><span>;</span>
<span>0017</span>  <span>b</span> <span>=</span> <span>gca</span><span>(</span><span>)</span><span>;</span>
<span>0018</span>  <span>b</span><span>.</span><span>font_color</span> <span>=</span> <span>co</span><span>;</span> 
<span>0019</span>  <span>b</span><span>.</span><span>foreground</span> <span>=</span> <span>co</span><span>;</span>
<span>0020</span>  <span>ylabel</span><span>(</span><span>string</span><span>(</span><span>kT</span><span>(</span><span>y_2</span><span>)</span><span>)</span><span>,</span><span>"</span><span>color</span><span>"</span><span>,</span><span>co</span><span>)</span>
<span>0021</span>  <span>b</span><span>.</span><span>axes_visible</span><span>(</span><span>1</span><span>)</span> <span>=</span> <span>"</span><span>off</span><span>"</span><span>;</span> 
<span>0022</span>  <span>//b.marings = [0.1 0.1 0.3 0.5]; </span>
<span>0023</span>  <span>//b.filled = </span><span>"</span><span>off</span><span>"</span><span>; </span>
<span>0024</span>  <span>subplot</span><span>(</span><span>3</span><span>,</span> <span>1</span><span>,</span> <span>3</span><span>)</span>
<span>0025</span>  <span>co</span><span>=</span><span>color</span><span>(</span><span>"</span><span>red</span><span>"</span><span>)</span><span>;</span>
<span>0026</span>  <span>plot2d</span><span>(</span><span>x1</span><span>,</span> <span>y3</span><span>,</span> <span>co</span><span>)</span><span>;</span> 
<span>0027</span>  <span>c</span> <span>=</span> <span>gca</span><span>(</span><span>)</span><span>;</span> 
<span>0028</span>  <span>//c.font_color = co; </span>
<span>0029</span>  <span>//c.foreground = co; </span>
<span>0030</span>  <span>//c.axes_visible(1) = </span><span>"</span><span>off</span><span>"</span><span>; </span>
<span>0031</span>  <span>ylabel</span><span>(</span><span>string</span><span>(</span><span>kT</span><span>(</span><span>y_3</span><span>)</span><span>)</span><span>,</span><span>"</span><span>color</span><span>"</span><span>,</span><span>co</span><span>)</span>
<span>0032</span>  <span>xlabel</span><span>(</span><span>string</span><span>(</span><span>'</span><span>Zeit [Sekunden]</span><span>'</span><span>)</span><span>)</span>
<span>0033</span>  <span>//c.marings = [0.1 0.1 0.5 0.3]; </span>
<span>0034</span>  <span>//c.filled = </span><span>"</span><span>off</span><span>"</span><span>; </span>
<span>0035</span>  
<span>0036</span>  <span>// Erstellt zweite x-Achse Problem: Kein newaxis im subplot möglich</span>
<span>0037</span>  <span>//subplot(3,1,3);</span>
<span>0038</span>  <span>//c=newaxes(c) </span>
<span>0039</span>  <span>//co = color(</span><span>"</span><span>blue</span><span>"</span><span>); </span>
<span>0040</span>  <span>//plot2d(x1, y2, co);</span>
<span>0041</span>  <span>//c.font_color = co; </span>
<span>0042</span>  <span>//c.foreground = co;</span>
<span>0043</span>  <span>//c.axes_visible(2) = </span><span>"</span><span>off</span><span>"</span><span>; </span>
<span>0044</span>  
<span>0045</span>  <span>drawnow</span><span>(</span><span>)</span></pre>
<p> </p>
<p> </p>
<p>Am 11.10.2016 09:45, schrieb Jens Simon Strom:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<pre>Dear Frieder,
Your diagram problem seems still to be pending. For further assistance 
it would be helpful if you answered a couple of questions:
1. Does your attachment "plot_date_16_lines.gif" (your mail 06.10.2016 
15:06) show real time data?
2. Is the overlap of the time labeling text colums (YY.MM.DD.hh.mm.ss) 
the essential remaining problem?
3. What is the maximum time interval (in seconds) you want to accomodate 
on the x-axis?
4. How many time points you want to accomodate on the x-axis at most?

Regards
Jens
---------------------------------------------------------------------------------------------------


Am 10.10.2016 13:38, schrieb Frieder Nikolaisen:</pre>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">Dear Philipp, thanks for you help. I tried to adopt your Code to my programm. No success. There is a prolbem I should have metioned eralier. The time between each datapoint has a different time period. So I cant print the y-axis over the time and add a a secound x axis for the line of document. I might stick to the plotxyyy. Best regards Frieder Am 10.10.2016 09:04, schrieb Philipp Mühlmann:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">Dear Frieder, one more comment. Instead of using "foo"-data, it might be more useful to plot each graph several times. Otherwise the y-axes are not assosiated with the data and you have to take more care about them. e.g.: // display all graph on first x-axis plot2d(x1,y1); // and hide the y1-axis plot2d(x1,y2); // and hide the y2-axis plot2d(x1,y3); // and hide the y3-axis // plot the y-axis assosiated with the corresponding data plot2d(x1,y1); // and hide the graph and the x1-axis and shift y1 to desired locaion plot2d(x1,y2); // and hide the graph and the x1-axis and shift y2 to desired locaion plot2d(x1,y3); // and hide the graph and the x1-axis and shift y3 to desired locaion // plot the x2-axis assosiated with the corresponding data plot2d(x2,y1); // and hide the graph and the y1-axis and shift x2 to desired locaion best regards, Philipp 2016-10-09 2:58 GMT+02:00 Philipp Mühlmann <<a href="mailto:p.muehlmann@gmail.com">p.muehlmann@gmail.com</a>[7]>:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">OK. Please find attached a sample that might help you. Note: It is possible to draw only an axis without showing the corresponding data. Hence: One can create some "fake" or "foo" data not displaying them, but showing the corresponding axis. so using this principle, you can draw as many axes as you like..and place them where you like. clc(); clear(all); // all datashare same x axis // example: there are 1000 datapoints x1 = linspace(1,1000,1000); // each graph has its own y-axis y1 = x1; y2 = 200*sin(1/20 * x1); y3 = sqrt(x1); // create fake x-values for y-axis fake_x = zeros(1,length(x1)); y1_min = 0; // min-value for y1-axis y1_max = 100; // max value for y1 axis y2_min = -2; // min-value for y2-axis y2_max = 2; // max value for y2 axis y3_min = 10; // min-value for y3-axis y3_max = 20; // max value for y3 axis // create 2nd x-axis // example: the 1000 datapoints has been taken in 60 seconds x2_min = 0; x2_max = 60; dx2 = x2_max - x2_min + 1 x2 = linspace(x2_min,x2_max,dx2); // create fake data for x2 axis fake_y = zeros(1,length(x2)); f = figure(); f.background = 8; drawlater() plot2d(x1, y1,1); plot2d(x1, y2,2); plot2d(x1, y3,5); a = gca() a.axes_visible(2)="off"; a.margins = [0.2 0.2 0.2 0.2]; // create y1 axis a1 = newaxes(); plot2d(fake_x, y1); // for fake_x = 0 creates a line on the y1-axis // therefore the fake data are not visible a1.children.children.visible = off; // hide fake graph if nesessary to only show the axes a1.data_bounds = [0,y1_min;1,y1_max]; // make x-coordinate start at 0 so that fake data aling with y-axis a1.axes_visible(1)="off"; a1.filled="off"; a1.y_location="left"; a1.margins = [0.2 0.2 0.2 0.2]; // create y2 axis a2 = newaxes(); c=color("blue"); a2.font_color=c; a2.foreground=c; plot2d(fake_x, y2,c); // for fake_x = 0 creates a line on the y2-axis // therefore the fake data are not visible a2.children.children.visible = off; // hide fake graph if nesessary to only show the axes a2.data_bounds = [0,y2_min;1,y2_max]; // set x-min to "0"...x_max does not matter, since x-axis wont be shown a2.axes_visible(1)="off"; a2.filled="off"; a2.y_location="left"; a2.margins = [0.1 0.2 0.2 0.2]; // create y3 axis a3 = newaxes(); c=color("red"); a3.font_color=c; a3.foreground=c; plot2d(fake_x, y3,c); // for fake_x = 0 creates a line on the y3-axis // therefore the fake data are not visible a3.children.children.visible = off; // hide fake graph if nesessary to only show the axes a3.data_bounds = [0,y3_min;1,y3_max]; // set x-min to "0"...x_max does not matter, since x-axis wont be shown a3.axes_visible(1)="off"; a3.filled="off"; a3.y_location="right"; a3.margins = [0.1 0.2 0.2 0.2]; a3.axes_reverse = ["on","off","off"]; // reverse x3 axis, since it is on the right side // create 2nd x-axis a4 = newaxes(); c=color("black"); a4.font_color=c; a4.foreground=c; plot2d(x2, fake_y,c); // for fake_y = 0 creates a line on the x2-axis // therefore the fake data are not visible a4.children.children.visible = off; // hide fake graph if nesessary to only show the axes a4.data_bounds = [min(x2),0;max(x2),1]; a4.axes_visible(2)="off"; a4.filled="off"; a4.x_location="bottom"; a4.margins = [0.2 0.2 0.2 0.1]; drawnow() 2016-10-09 1:04 GMT+02:00 Frieder Nikolaisen <<a href="mailto:Frieder.Nikolaisen@student.hs-rm.de">Frieder.Nikolaisen@student.hs-rm.de</a>[6]>:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">Dear Philipp, thank you, thats great. I will try it at work on monday. Actually, I do have three plots sharing a common x axis and having three different y axis. Why I do want to have two x axis is, to show to different times on x. Once in secound, once in line of document. Best regards Frieder Am 08.10.2016 um 23:43 schrieb Philipp Mühlmann:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">Dear Frieder, I understand following: You want to plot 3 graphs into one diagram. Basically each graph has its own x and y axis. Since for two graphs the x-axis are the same, you want to have a diagram with two x-axis and three y-axis Please find a code snipplet that will create such a diagram. Best regards, Philipp clc(); clear(all); x1 = linspace(1,10,10); x2 = linspace(0,100,101); x3 = x1; y1 = linspace(1,10,10); y2 = sin(x2); y3 = sqrt(x1); drawlater() plot2d(x1, y1); a1 = gca(); a1.x_location = "bottom"; a1.y_location = "left"; a1.margins = [0.2,0.2,0.2,0.2] // Axis y2 a2=newaxes(); c=color("blue"); plot2d(x2,y2,style = c); a2.font_color=c; a2.foreground=c; a2.filled="off"; a2.x_location="bottom"; a2.y_location="right"; a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to graphic window a2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that graph is nicely placed in plotted area // Axis y3 a3=newaxes(); c=color("red"); plot2d(x3,y3,style = c); a3.font_color=c; a3.foreground=c; a3.filled="off"; a3.x_location="bottom"; a3.y_location="left"; a3.data_bounds = [0,1;10,4]; a3.margins = [0.134 0.2 0.2 0.2]; // display x3 to check overlapping of x1 and x3 tics; // if overlapping is good enough, than hide x3 a3.axes_visible(1)="off"; drawnow() 2016-10-06 21:28 GMT+02:00 Jens Simon Strom <<a href="mailto:j.s.strom@hslmg.de">j.s.strom@hslmg.de</a>[3]>:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">EDIT IN #3 Am 06.10.2016 18:20, schrieb Jens Simon Strom:
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">Hallo Frieder, You ask many questions in one post. 1: You just divide the (numerical) time interval into an adequate number of points (which can be neatly accommodated) with linspace or : and plot the corresponding time text colums via a for-loop. There is no need that text times coincide with measured data. They only should be placed at the correct locations. 3:You may not be familiar with how to get quick help from Scilab: Just highlight the command plot2d or style here and go to the help pages BY RIGHT MOUSE CLICK. 4: Highlight newaxes, foreground 5: I would postpone integrating a checkbox until everything else is to your satisfaction. The rest of #5 is perhaps answered by #1. General remarks * Do not ask many questions simultaneously. Attack them one by one. You make it easier for yourself and the helpers. * Accompany your questions by short examples which omit irrelevant ornaments. The code you really write with the variables you really use is less appropriate in most cases. * Begin to polish the results (color, line types, fonts, fontsize, etc.) only as the last step in your work. At the beginning accept what Scilab delivers to you. * Work the help pages. My painful experience is that the polishing job often consumes more time (and nerves) than the technical problem itself. Scilab is far from intuitive in that respect. Kind regards, Jens</blockquote>
_______________________________________________ users mailing list <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> [1] <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a> [2]</blockquote>
-- In Kanada is ka na da. Sonst wär Kanada Jemanda. There we have the salad. _______________________________________________ users mailing list <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a></blockquote>
_______________________________________________ users mailing list <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> [4] <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a> [5]</blockquote>
-- In Kanada is ka na da. Sonst wär Kanada Jemanda. There we have the salad.</blockquote>
-- In Kanada is ka na da. Sonst wär Kanada Jemanda. There we have the salad. Links: ------ [1] mailto:<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> [2] <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a> [3] mailto:<a href="mailto:j.s.strom@hslmg.de">j.s.strom@hslmg.de</a> [4] mailto:<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> [5] <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a> [6] mailto:<a href="mailto:Frieder.Nikolaisen@student.hs-rm.de">Frieder.Nikolaisen@student.hs-rm.de</a> [7] mailto:<a href="mailto:p.muehlmann@gmail.com">p.muehlmann@gmail.com</a></blockquote>
_______________________________________________ users mailing list <a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> <a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a></blockquote>
<pre>_______________________________________________
users mailing list
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p> </p>
<div> </div>
<a href="http://dict.leo.org/ende/index_de.html#/search=capitalization&searchLoc=0&resultOrder=basic&multiwordShowSingle=on&pos=0">capitalization</a><small><sup><a href="http://dict.leo.org/ende/index_de.html#/search=AE&searchLoc=0&resultOrder=basic&multiwordShowSingle=on&pos=0"><span style="font-size: x-small;">AE</span></a></sup></small>
</body></html>