<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Univers 57 Condensed";
        panose-1:0 11 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;
        color:black;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Univers 57 Condensed";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:"Univers 57 Condensed";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle26
        {mso-style-type:personal-reply;
        font-family:"Univers 57 Condensed";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Serge,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Thank you for the solution provided.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>It does the scaling job but the window size is limited to the screen size (whenever the scaled Window is bigger than the screen, my Scilab 5.4.1 on Win 7 crashes abruptly).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>It would be very useful to be able to display a scaled plot with scrolling bars, to be able to browse the plot details.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Best regards<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Rafael<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> users [mailto:users-bounces@lists.scilab.org] <b>On Behalf Of </b>Serge Steer<br><b>Sent:</b> Thursday, January 09, 2014 7:46 PM<br><b>To:</b> International users mailing list for Scilab.<br><b>Subject:</b> Re: [Scilab-users] Scaled plot displays in Scilab?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>You can proceed as follow. Note however that at least under windows it is not possible to create a window larger than the screen.<br>Serge Steer<br><br>clf;plot(linspace(0,100,10),linspace(0,150,10))<br><br>fig=gcf();<br>ax=gca();<br>ax.tight_limits="on";<br>//Dimensions of the axis in user coordinates<br>ax_xu=ax.data_bounds(2,1)-ax.data_bounds(1,1);<br>ax_yu=ax.data_bounds(2,2)-ax.data_bounds(1,2);<br>//pixel size in mm to be determined according to screen size and resolution <br>px=0.33;//conversion pixel to mm<br>py=0.35;//conversion pixel to mm<br>//Dimension of the axis in pixels <br>ax_xp=ax_xu/px;<br>ax_yp=ax_yu/py;<br>//Dimension of the current portion of the canvas  in pixels<br>ax_Wp=ax_xp/(1-sum(ax.margins(1:2)));<br>ax_Hp=ax_yp/(1-sum(ax.margins(3:4)));<br>//Canvas dimensions in pixels<br>fig_Wp=ax_Wp/ax.axes_bounds(3);<br>fig_Hp=ax_Hp/ax.axes_bounds(4);<br>//Set fig.axes_size property to have <br>fig.axes_size=[fig_Wp,fig_Hp];<o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=3 width="100%" align=center id=zwchr></div><blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-family:"Helvetica","sans-serif"'>De: </span></b><span style='font-family:"Helvetica","sans-serif"'>"Rafael Guerra" <jrafaelbguerra@hotmail.com><br><b>À: </b>"International users mailing list for Scilab." <users@lists.scilab.org><br><b>Envoyé: </b>Jeudi 9 Janvier 2014 16:46:04<br><b>Objet: </b>Re: [Scilab-users] Scaled plot displays in Scilab?</span><span style='font-size:12.0pt;font-family:"Helvetica","sans-serif"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Hi Stanislav,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Thanks but it does not guarantee that the interval [x0,x0+10] will be plotted over 1 cm of the screen...</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>I think that one may have to use a function like xchange but, more info about the physical screen is still required.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Regards</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'>Rafael G.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Univers 57 Condensed";color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> users [mailto:users-bounces@lists.scilab.org] <b>On Behalf Of </b>?????????<br><b>Sent:</b> Thursday, January 09, 2014 3:34 PM<br><b>To:</b> users@lists.scilab.org<br><b>Subject:</b> Re: [Scilab-users] Scaled plot displays in Scilab?</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><div><p class=MsoNormal>Hello.<br>You may divide x-axis by 1000. For example: plot2d(x ./ 1000, y);<br>Also you may use a logarithm scale of x-axis.<br><br>Stanislav<br>09.01.2014 21:14, Rafael Guerra пишет:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'>Hello,</span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'>Does anyone know if it possible to generate scaled plots in Scilab?</span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'>Say one wants to plot y=f(x), with x being a distance, at 1:1000 scale (i.e., 1 cm on the PC screen would correspond to 10 m along x-variable). Scroll bar may be needed, if for given scale plot is larger than physical screen.</span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'>Thanks for any hints.</span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'>Best regards</span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'>Rafael G.</span><o:p></o:p></p><p class=MsoPlainText><span lang=EN-GB style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br></span><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>users mailing list<o:p></o:p></pre><pre><a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><o:p></o:p></pre><pre><a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Helvetica","sans-serif"'><br>_______________________________________________<br>users mailing list<br><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div></div></body></html>