angus.morgan Posted March 29, 2011 Share Posted March 29, 2011 I can't seem to get graphs to plot variables correctly in some situations. In the attached file, if you click the "Plot Using Pre Defined Vars" button, it runs a sequence that populates two variables with arrays of pre-defined values. This plots fine, and the values show in the table correctly. The other button starts a sequence that prompts the user for the x any y values. It appers to update the arrays ok, as shown in the table, but only one point is shown on the graph. Graph_Test.ctl Link to comment Share on other sites More sharing options...
AzeoTech Posted March 29, 2011 Share Posted March 29, 2011 The problem is almost certainly alignment. XY graphs by default try and align the two traces based on time. That way you can do an XY graph of data being taken once a second with one being taken twice a second and not worry about the fact that one array of data is twice the size. However, if you are manually adding data, you are likely not setting the time, so alignment isn't working well. You can turn off align by going to the Bottom Axis settings and setting the Align Thresh to -1. Link to comment Share on other sites More sharing options...
angus.morgan Posted March 30, 2011 Author Share Posted March 30, 2011 Brilliant, problem solved! Many Thanks Link to comment Share on other sites More sharing options...
raining010 Posted September 29, 2013 Share Posted September 29, 2013 Thanks, I met the same require, and did it by referring this topic. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.