dblk22vball Posted August 27, 2009 Report Share Posted August 27, 2009 I am trying to create a Line Graph in labview that will plot with duplicate X values. Basically, my data looks like X Y 0 1 1 2 2 3 2 3 1 1 0 0 The Waveform Graph will display the Y axis correctly, so the user gets the shape, but the X axis is just in numerical order, so it is meaningless (in this case). If you use the XY graph, the line turns back on itself. I have tried the Xscale marker values property node, but it did not display correctly. http://picasaweb.goo...feat=directlink Quote Link to comment
crelf Posted August 27, 2009 Report Share Posted August 27, 2009 If you use the XY graph, the line turns back on itself. That shouldn't happen (unless you make it happen) - can you upload a code snippet of what you're doing? Quote Link to comment
Yair Posted August 27, 2009 Report Share Posted August 27, 2009 I'm not sure what you mean by "duplicate X values", but if you don't want the line to go "back", just sort the data by the X array before putting it into the graph. Quote Link to comment
dblk22vball Posted August 27, 2009 Author Report Share Posted August 27, 2009 (edited) I'm not sure what you mean by "duplicate X values", but if you don't want the line to go "back", just sort the data by the X array before putting it into the graph. I cant sort it, as it would not make sense in the context of the test. Basically it is a load test, with the X axis being the pressure and the Y axis being the deflection. So you want to see how it defelcted as the load increased, and then when it decresed, as it happened. If you sort it, you cannot tell what happened. point load 300 lb.txt Edited August 27, 2009 by dblk22vball Quote Link to comment
Yair Posted August 27, 2009 Report Share Posted August 27, 2009 So what you want is basically a 3D graph - deflection over pressure over time, right? Quote Link to comment
dblk22vball Posted August 27, 2009 Author Report Share Posted August 27, 2009 Time is not a concern, just the sequence it happened. Pressure and deflection are all that need to be plotted, just in the sequence in which the data was gathered. Quote Link to comment
Yair Posted August 27, 2009 Report Share Posted August 27, 2009 Sequence=time. Basically, you have a problem, because you want the X scale to represent both time (sequence) and pressure. It doesn't make sense to me. How would you expect such a graph to look? You could do it as a bar graph or an intensity graph or something like that, but you need to know how you want it to look. Now I also understand better your comment about the scale marker labels. If I understand correctly, you want X to be time and Y to be deflection, but you want to show a pressure for each data point. Quote Link to comment
dblk22vball Posted August 27, 2009 Author Report Share Posted August 27, 2009 Here is the plot in Excel, as a line graph (what I am trying to do in LabVIEW). Quote Link to comment
Yair Posted August 27, 2009 Report Share Posted August 27, 2009 So you basically want the X scale to have a label (the pressure) for each point. I believe this isn't supported, but I think some of the VIs in the graphics palette allow you to build this kind of graph. I think there's an example either in the example finder or somewhere in the NI forums. Alternatively, you can try displaying some annotations on the graph. You can give them whatever text you want and use code to place them where you want. Quote Link to comment
JohnLV Posted December 22, 2011 Report Share Posted December 22, 2011 so how to handle the issues you have mention. Quote Link to comment
Yair Posted December 22, 2011 Report Share Posted December 22, 2011 so how to handle the issues you have mention. I don't know what that question means. I suggest you start a new thread with proper details of what you want and what you already tried. Images also help. Quote Link to comment
Norm Kirchner Posted January 12, 2012 Report Share Posted January 12, 2012 You need to use the XY plot. You'll need to sort your data according to whatever you declare your X axis to be This VI will allow you to take an XY plot and order it by X points Order XY Points.vi This is an example of it in action on the XY Graph:Mouse Down event Create XY Plot.vi <!-- copy and paste. Modify height and width if desired. --> <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/f2f65ae2-3013-4a8d-b30b-f046dbc98a45/2012-01-12_1530.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/f2f65ae2-3013-4a8d-b30b-f046dbc98a45/2012-01-12_1530.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/f2f65ae2-3013-4a8d-b30b-f046dbc98a45/2012-01-12_1530.png" width="848" height="379" border="0" /></a> Good Luck, ~,~ The Captain was here <!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" width="796" height="746" type="application/x-shockwave-flash" data="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e1f666fc-d269-4a1c-8cb7-5f6a9301740d/jingh264player.swf" > <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e1f666fc-d269-4a1c-8cb7-5f6a9301740d/jingh264player.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e1f666fc-d269-4a1c-8cb7-5f6a9301740d/FirstFrame.jpg&containerwidth=796&containerheight=746&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e1f666fc-d269-4a1c-8cb7-5f6a9301740d/2012-01-12_1532.mp4&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e1f666fc-d269-4a1c-8cb7-5f6a9301740d/" /> <iframe type="text/html" frameborder="0" scrolling="no" style="overflow:hidden;" src="http://www.screencast.com/users/NJKirchner/folders/Jing/media/e1f666fc-d269-4a1c-8cb7-5f6a9301740d/embed" height="746" width="796" ></iframe> </object> Something like this? I know it doesn't look like your plot in excel, but your plot in excel is EXTREMELY misleading. In any Cartesian plot, an axis in 1 direction is Always increasing or Decreasing. Your plot in excel has the X axis be completely randomly ordered It almost sounds like you want 2 plots on the same graph, showing both Instr 1 and Force collectively vs sequence # But in either case you have an answer to both scenario <!-- copy and paste. Modify height and width if desired. --> <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/970befbf-eaa8-4109-a5f0-08c6e4bb87b7/2012-01-12_1544.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/970befbf-eaa8-4109-a5f0-08c6e4bb87b7/2012-01-12_1544.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/970befbf-eaa8-4109-a5f0-08c6e4bb87b7/2012-01-12_1544.png" width="1049" height="670" border="0" /></a> Best, Norm Quote Link to comment
Darin Posted January 12, 2012 Report Share Posted January 12, 2012 It is pretty straightforward to add text annotations to your plots using images: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.