<div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1434635342633_2539"><span id="yui_3_16_0_1_1434635342633_2541"><font size="2" id="yui_3_16_0_1_1434635342633_5365">Hi Jean,</font></span></div><div id="yui_3_16_0_1_1434635342633_2539"><span><font size="2"><br></font></span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span id="yui_3_16_0_1_1434635342633_2540"><font size="2" id="yui_3_16_0_1_1434635342633_5374">Thanks for your answer. This solves my problem!</font></span></div><div id="yui_3_16_0_1_1434635342633_2539"><span><font size="2"><br></font></span></div><div id="yui_3_16_0_1_1434635342633_2539"><span id="yui_3_16_0_1_1434635342633_2623"><font size="2" id="yui_3_16_0_1_1434635342633_5373">I reckon Scilab is an excellent and powerful mathematical software. However, it requires a medium/deep knowledge of programming to solve a simple problem.</font></span></div><div id="yui_3_16_0_1_1434635342633_2539"><span><font size="2"><br></font></span></div><div id="yui_3_16_0_1_1434635342633_2539"><span id="yui_3_16_0_1_1434635342633_3071"><font size="2" id="yui_3_16_0_1_1434635342633_5369">For example: To change some basic parameters such as: x- and y-ticks, the Scilab users need to program some tens of (complex) code instructions:</font></span></div><div id="yui_3_16_0_1_1434635342633_2539"><span><font size="2"><br></font></span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2" id="yui_3_16_0_1_1434635342633_5370"><span class="" id="yui_3_16_0_1_1434635342633_3356">tmp=a.x_ticks; </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3357">tmp.locations=[-12:12]'; </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3358">tmp.labels=string(tmp.locations); </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3584">a.x_ticks=tmp; </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3583">tmp=a.y_ticks; </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3582">tmp.locations=[-0.4:.1:1]'; </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3581">tmp.labels=string(tmp.locations); </span><br clear="none" class=""><span class="" id="yui_3_16_0_1_1434635342633_3580">a.y_ticks=tmp; </span><span><br></span></font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span><font size="2"><br></font></span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span style="font-size: small;"><br></span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span style="font-size: small;" id="yui_3_16_0_1_1434635342633_5458">Why hasn't Scilab got a single code to change x- and y- parameters (e.g., a.x_ticks=[-12:1:12] and a.y_ticks=[-0.4:.1:1])? This could be easier for Scilab users and makes the script be compact!</span><br></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span><font size="2"><br></font></span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2" id="yui_3_16_0_1_1434635342633_5414">Furthermore, if I don't use the code: <span class="" id="yui_3_16_0_1_1434635342633_4497">a.tight_limits = "on" the y-axis range is from <b>-0.4</b> to 1; however, if I use it, the y-axis range changes to <b id="yui_3_16_0_1_1434635342633_5497">-0.2</b> to 1. Why? </span></font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span style="font-size: small;"><br></span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span style="font-size: small;" id="yui_3_16_0_1_1434635342633_5498">In addition, how could I change the y-axis range (i.e., y_min and y_max)?</span></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><br></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2"><br></font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2" id="yui_3_16_0_1_1434635342633_5602">Thank you in advance.</font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2"><br></font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2">All best,</font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><font size="2">Reinaldo.</font></div><div id="yui_3_16_0_1_1434635342633_2539" dir="ltr"><span><font size="2"><br></font></span></div><font size="2"><br> </font><div id="yui_3_16_0_1_1434635342633_2478"> <div id="yui_3_16_0_1_1434635342633_2477"> <div dir="ltr" id="yui_3_16_0_1_1434635342633_2510"> <hr size="1" id="yui_3_16_0_1_1434635342633_2772"> <font size="2" id="yui_3_16_0_1_1434635342633_5499"><font id="yui_3_16_0_1_1434635342633_2509"> <b><span style="font-weight:bold;">De:</span></b> jbaudais [via Scilab / Xcos - Mailing Lists Archives] <<a href="/user/SendEmail.jtp?type=node&node=4032474&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>><br> <b id="yui_3_16_0_1_1434635342633_5833"><span style="font-weight: bold;" id="yui_3_16_0_1_1434635342633_5832">Para:</span></b> Reinaldo <<a href="/user/SendEmail.jtp?type=node&node=4032474&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>> <br> <b><span style="font-weight: bold;">Enviadas:</span></b> Terça-feira, 16 de Junho de 2015 5:04<br> <b><span style="font-weight: bold;">Assunto:</span></b> Re: How can I change the x_ticks and y_ticks?<br> </font> </font></div> <div class="y_msg_container" id="yui_3_16_0_1_1434635342633_2476"><font size="2"><br></font><div id="yiv5042434299"><div id="yui_3_16_0_1_1434635342633_2475"><font size="2" id="yui_3_16_0_1_1434635342633_5664">
Hello,
<br clear="none"><br clear="none">Le 16/06/2015 02:12, Reinaldo a écrit :
</font><div class="yiv5042434299shrinkable-quote" id="yui_3_16_0_1_1434635342633_2474"><font size="2" id="yui_3_16_0_1_1434635342633_5625"><div class='shrinkable-quote'><br clear="none">> How could I change the x_ticks and y_ticks?
<br clear="none">> For example: In this following script, the x_ticks displays each 2 units on X axis. I'd like each 0.5; and the y_ticks displays each 0.2 units on Y axis. I'd like each 0.1. How could I change those parameters?
<br clear="none">> function f=myfunction(x)
<br clear="none">> f = sin(x)./x
<br clear="none">> endfunction
<br clear="none">>
<br clear="none">> // Plot
<br clear="none">> scf(1);
<br clear="none">> clf(1);
<br clear="none">> xdata = linspace ( -12, 12, 100 );
<br clear="none">> ydata = myfunction ( xdata );
<br clear="none">> plot ( xdata , ydata );
<br clear="none">> a=gca(); // obtendo o manipulador dos eixos correntes
<br clear="none">> a.grid=[1 1];
<br clear="none">> xlabel("X","fontsize",4,"color","red");
<br clear="none">> ylabel("Y","fontsize",4,"color","red");Thank you in advance.
<br clear="none">> All best,Reinaldo.
</font></div><font size="2" id="yui_3_16_0_1_1434635342633_5626"></div><br clear="none"><br clear="none">For example, you could use
<br clear="none"><br clear="none">function f=myfunction(x)
<br clear="none">f = sin(x)./x
<br clear="none">endfunction
<br clear="none"><br clear="none">// Plot
<br clear="none">scf(1);
<br clear="none">clf(1);
<br clear="none">xdata = linspace ( -12, 12, 100 );
<br clear="none">ydata = myfunction ( xdata );
<br clear="none">plot ( xdata , ydata );
<br clear="none">a=gca(); // obtendo o manipulador dos eixos correntes
<br clear="none">a.tight_limits = "on";
</font><div class="qtdSeparateBR"><br><br></div><div class="yiv5042434299yqt8030566785" id="yiv5042434299yqtfd33136"><font size="2"><br clear="none">a.grid=[1 1];
<br clear="none">xlabel("X","fontsize",4,"color","red");
<br clear="none">ylabel("Y","fontsize",4,"color","red");
</font></div><font size="2" id="yui_3_16_0_1_1434635342633_5368"><br clear="none">tmp=a.x_ticks;
<br clear="none">tmp.locations=[-12:12]';
<br clear="none">tmp.labels=string(tmp.locations);
<br clear="none">a.x_ticks=tmp;
<br clear="none">tmp=a.y_ticks;
<br clear="none">tmp.locations=[-0.4:.1:1]';
<br clear="none">tmp.labels=string(tmp.locations);
<br clear="none">a.y_ticks=tmp;
<br clear="none"><br clear="none"><br clear="none">See
<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://groups.google.com/forum/#!topic/comp.soft-sys.math.scilab/W2NwNbnys_I/discussion" id="yui_3_16_0_1_1434635342633_3839" link="external">https://groups.google.com/forum/#!topic/comp.soft-sys.math.scilab/W2NwNbnys_I/discussion</a><br clear="none">but I'm not sure that's the good link...
<br clear="none"><br clear="none">-- Jean-Yves
<br clear="none"><br clear="none">_______________________________________________
<br clear="none">users mailing list
<br clear="none"><a rel="nofollow" shape="rect" href="" target="_top" link="external">[hidden email]</a>
<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.scilab.org/mailman/listinfo/users" link="external">http://lists.scilab.org/mailman/listinfo/users</a><br clear="none">
<br clear="none">
<br clear="none">
</font><hr noshade="" size="1" color="#cccccc">
<div style="color: rgb(68, 68, 68); font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;" id="yui_3_16_0_1_1434635342633_5343">
<div style="font-weight:bold;" id="yui_3_16_0_1_1434635342633_5342"><font size="2">If you reply to this email, your message will be added to the discussion below:</font></div>
<font size="2"><a rel="nofollow" shape="rect" target="_blank" href="http://mailinglists.scilab.org/Scilab-users-How-can-I-change-the-x-ticks-and-y-ticks-tp4032449p4032451.html" link="external">http://mailinglists.scilab.org/Scilab-users-How-can-I-change-the-x-ticks-and-y-ticks-tp4032449p4032451.html</a>
</font></div>
<div style="color: rgb(102, 102, 102); font-style: normal; font-variant: normal; font-weight: normal; margin-top: 0.4em; line-height: 1.5em;"><font size="2">
To start a new topic under Scilab users - Mailing Lists Archives, email <a href="/user/SendEmail.jtp?type=node&node=4032474&i=2" target="_top" rel="nofollow" link="external">[hidden email]</a> <br clear="none">
To unsubscribe from Scilab users - Mailing Lists Archives, <a rel="nofollow" shape="rect" target="_blank" href="" link="external">click here</a>.<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;" link="external">NAML</a></font><div class="yiv5042434299yqt8030566785" id="yiv5042434299yqtfd13955">
</div></div></div></div><font size="2" id="yui_3_16_0_1_1434635342633_5366"><br id="yui_3_16_0_1_1434635342633_5341"></font><br></div> </div> </div> </div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://mailinglists.scilab.org/Scilab-users-How-can-I-change-the-x-ticks-and-y-ticks-tp4032449p4032474.html">Re: How can I change the x_ticks and y_ticks?</a><br/>
Sent from the <a href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">Scilab users - Mailing Lists Archives mailing list archive</a> at Nabble.com.<br/>