Christian_Bramsiepe Posted May 26, 2008 Share Posted May 26, 2008 Hi! I want to plot a graph in which the x-axis (time) does show the whole range of measured values. This means that all data shall be plotted from the first measured point of time as minimum on the x-axis and the last measured point of time as maximum on the x-axis and the graph updates every time a new value is stored. The method I have found that comes the closest to my desired result, is to use the option "time width". But in this case only a certain number of measurements is plotted and the width of the axis does not adapt to the measured values. Many thanks in advance for your help! Best regards! Christian Link to comment Share on other sites More sharing options...
AzeoTech Posted May 28, 2008 Share Posted May 28, 2008 Actually, you want to uncheck "TimeWidth" and put expressions into the Scale From and Scale To boxes above it for the bottom axis. The expressions are (assuming what you are graphing is mychannel: Scale From: GetTime(mychannel[numrows(mychannel)-1]) Scale To: GetTime(mychannel[0]) You can also do it: Scale From: mychannel.time[numrows(mychannel)-1] Scale To: mychannel.time[0] I don't think it makes a difference which you use. Basically you are getting the time of particular data points in your channel's history. NumRows() returns the number of rows in the history, and since things are 0 indexed, you have to subtract 1 from it to get the index of the last element in the history. The first (most recent) element is always [0]. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.