<html><body>
<p><font size="2" face="sans-serif">Antoin,e, thanks.</font><br>
<font size="2" face="sans-serif">This is essentially what I was looking for.</font><br>
<br>
<font size="2" face="sans-serif">I haven't used Xcos much - but I presume this could be wrapped up to use there?</font><br>
<br>
<font size="2" face="sans-serif">Thanks again - </font><br>
<font size="2" face="sans-serif">Steve</font><br>
<br>

<script language="JavaScript" type="text/javascript">
<!-- 
function _dSectionExpand(sec) {
         document.getElementById("cSec"+sec).style.display = "none";
         document.getElementById("xSec"+sec).style.display = "block";
}
function _dSectionCollapse(sec) {
         document.getElementById("xSec"+sec).style.display = "none";
         document.getElementById("cSec"+sec).style.display = "block";
}
// -->
</script>
<div id="cSec1"><a href="javascript:_dSectionExpand('1')" onclick="return _dSectionExpand('1');"><img src="/icons/expand.gif" border="0" alt="Show details for "Antoine Monmayrant" ---04/26/2017 09:54:50 AM---Hi Steve, I don't think stripcharts exist in Scilab."></a><a onclick="return _dSectionExpand('1');"><font size="2" color="#424282" face="sans-serif">"Antoine Monmayrant" ---04/26/2017 09:54:50 AM---Hi Steve, I don't think stripcharts exist in Scilab.</font></a></div><div id="xSec1"><a href="javascript:_dSectionCollapse('1')" onclick="return _dSectionCollapse('1');"><img src="/icons/collapse.gif" border="0" alt="Hide details for "Antoine Monmayrant" ---04/26/2017 09:54:50 AM---Hi Steve, I don't think stripcharts exist in Scilab."></a><a onclick="return _dSectionCollapse('1');"><font size="2" color="#424282" face="sans-serif">"Antoine Monmayrant" ---04/26/2017 09:54:50 AM---Hi Steve, I don't think stripcharts exist in Scilab.</font></a><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:      </font><font size="1" face="sans-serif">"Antoine Monmayrant" <antoine.monmayrant@laas.fr></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">"Users mailing list for Scilab" <users@lists.scilab.org></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:      </font><font size="1" face="sans-serif">04/26/2017 09:54 AM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:   </font><font size="1" face="sans-serif">Re: [Scilab-users]      ?==?utf-8?q? ?==?utf-8?q? stripchart?</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Sent by:   </font><font size="1" face="sans-serif">"users" <users-bounces@lists.scilab.org></font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2">Hi Steve,<br>
<br>
I don't think stripcharts exist in Scilab.<br>
That being said, you can emulate them pretty easily.<br>
See below the most simple example of such an emulation.<br>
In a more realistic scenario, you could replace my loop by a callback function that updates the plot everytime a new datapoint is measured.<br>
<br>
Hope it helps,<br>
<br>
Antoine<br>
<br>
//////////////////////////////////////////////////////////<br>
npts=100;<br>
<br>
y=rand(1,100);<br>
x=1:npts;<br>
<br>
h=scf();<br>
h.children.tight_limits="on";<br>
plot(x,y,'k.-');<br>
xlabel('Time')<br>
ylabel('Data')<br>
e=gce();//handle to the plot<br>
<br>
//dummy loop to simulate data generation and plotting<br>
for i=1:1000<br>
    oldxy=e.children.data;//old data<br>
    <br>
    newy=rand();//this would be your recently measured Y<br>
    newx=oldxy($,1)+1;//this would be your recently measured X<br>
    newxy=[oldxy(2:$,:);[newx,newy]];<br>
    e.children.data=newxy;//update data<br>
    xmin=min(newxy(:,1));<br>
    xmax=max(newxy(:,1));<br>
    ymin=min(newxy(:,2));<br>
    ymax=max(newxy(:,2));<br>
    e.parent.data_bounds= [xmin,ymin; xmax,ymax];//rescale plot<br>
    sleep(50)//wait a bit for a slow scroll<br>
end<br>
//////////////////////////////////////////////////////////<br>
<br>
 <br>
Le Mercredi, Avril 26, 2017 15:30 CEST, shorne@energetiq.com a écrit: <br>
 <br>
> <br>
> In doing some real-time work I would find a stripchart very useful.<br>
> I have a process generating (say) 10 values/second,<br>
> that emits two values  (Time,Temperature).  This might be an xcos<br>
> calculation, or a realtime data stream.<br>
> <br>
> I would like to plot this data on a "stripchart" - to show only the (say)<br>
> latest 10 seconds of data,<br>
> with the plot scrolling to the left - new points  added to the right, data<br>
> falls off the end on the left.<br>
> <br>
> Digging through the docs I find no trace of such a creature.<br>
> <br>
> Am I missing something obvious, or do we not have this capability in<br>
> scilab?<br>
> <br>
> Thanks,<br>
> Steve<br>
<br>
_______________________________________________<br>
users mailing list<br>
users@lists.scilab.org<br>
</font></tt><tt><font size="2"><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a></font></tt><tt><font size="2"><br>
</font></tt><br>
</div>
<script language="JavaScript" type="text/javascript">
<!-- 
_dSectionExpand('1');
// -->
</script>
<br>
</body></html>