Michael Malak Posted May 24, 2009 Report Share Posted May 24, 2009 Plotting multiple plots to a single XY Graph is easy enough when the XY Graph is in the same VI -- thanks to the Multi Plot example that comes with LabVIEW. Specifically, create a 1-D array of clusters of a 1-D array of (x,y) points/clusters. This can connect directly to an actual XY Graph. But all I have is a reference to an XY Graph. When I select the "Value" property, it won't accept multiple plots. It will only accept a single plot. What property(ies) should I be using to plot multiple plots on an XY graph? Quote Link to comment
Y-P Posted May 24, 2009 Report Share Posted May 24, 2009 Could you please make an example of your datatype (1D-array of clusters of a 1D-array of (x,y) points/clusters)? Greetings Markus ZITAT(Michael Malak @ May 23 2009, 02:12 AM) Plotting multiple plots to a single XY Graph is easy enough when the XY Graph is in the same VI -- thanks to the Multi Plot example that comes with LabVIEW. Specifically, create a 1-D array of clusters of a 1-D array of (x,y) points/clusters. This can connect directly to an actual XY Graph.But all I have is a reference to an XY Graph. When I select the "Value" property, it won't accept multiple plots. It will only accept a single plot. What property(ies) should I be using to plot multiple plots on an XY graph? Quote Link to comment
Francois Normandin Posted May 24, 2009 Report Share Posted May 24, 2009 QUOTE (Michael Malak @ May 22 2009, 08:12 PM) Plotting multiple plots to a single XY Graph is easy enough when the XY Graph is in the same VI -- thanks to the Multi Plot example that comes with LabVIEW. Specifically, create a 1-D array of clusters of a 1-D array of (x,y) points/clusters. This can connect directly to an actual XY Graph.But all I have is a reference to an XY Graph. When I select the "Value" property, it won't accept multiple plots. It will only accept a single plot. What property(ies) should I be using to plot multiple plots on an XY graph? The XY Graph is polymorphic. If you wire a different datatype in a VI, it's gonna change datatype to adapt. But if you use a reference, the datatype needs to be matched to the one in the VI where you got your reference from. Be careful with this because once you've created your reference and used it elsewhere in your program, you have a lot of broken arrows or error pop-ups (if value is a variant) if you ever change the datatype of your graph... Quote Link to comment
Peeker Posted May 26, 2009 Report Share Posted May 26, 2009 QUOTE (normandinf @ May 23 2009, 01:52 PM) The XY Graph is polymorphic. If you wire a different datatype in a VI, it's gonna change datatype to adapt. But if you use a reference, the datatype needs to be matched to the one in the VI where you got your reference from. Be careful with this because once you've created your reference and used it elsewhere in your program, you have a lot of broken arrows or error pop-ups (if value is a variant) if you ever change the datatype of your graph... The XY graph reference dilemma has been annoying me as well for a while. I would love to have a general reference to a XY graph so that i dynamically can control what is shown in the graph. Does anyone have a good workaround? Is there a way of up- and down-casting the type so that i can take a more general XY graph reference as input to my sub-vi (or more specifically store the general reference in a parent class)? Quote Link to comment
ShaunR Posted May 26, 2009 Report Share Posted May 26, 2009 I don't really know what problem its trying to overcome, but all the methods stated work for me You might also look at the "Many To One" queue example if you are looking to combine multiple single plots from other VIs.. Quote Link to comment
Michael Malak Posted May 27, 2009 Author Report Share Posted May 27, 2009 QUOTE (normandinf @ May 23 2009, 06:52 AM) The XY Graph is polymorphic. If you wire a different datatype in a VI, it's gonna change datatype to adapt. But if you use a reference, the datatype needs to be matched to the one in the VI where you got your reference from. Be careful with this because once you've created your reference and used it elsewhere in your program, you have a lot of broken arrows or error pop-ups (if value is a variant) if you ever change the datatype of your graph... That was it! I deleted my XY Graph, placed a new one, and wired in the data generation from the LabVIEW example code for multiple plots. Then I created a new reference from that and deleted the data generation code. Thanks for the help. Quote Link to comment
Rio C. Posted May 28, 2009 Report Share Posted May 28, 2009 QUOTE (Michael Malak @ May 26 2009, 02:07 PM) That was it!I deleted my XY Graph, placed a new one, and wired in the data generation from the LabVIEW example code for multiple plots. Then I created a new reference from that and deleted the data generation code. Thanks for the help. That sounds very familiar to one of the Known Issues. [Don't] Try this (it will crash LabVIEW): 1. Create an XY Graph and wire it to a cluster of X and Y arrays. 2. Create a reference and wire to a property node. 3. Wire an array of clusters to the XY Graph. The only way I know of to fix it is to delete the reference and recreate it, just as you did. Also, when using arrays of XY Graph(s), if you don't want to lose the configuration of your graph every time the array changes, use arrays of NaN instead of changing the size of the array. ShaunR, can you be more specific about the "Many To One" queue example, maybe a link? Quote Link to comment
essi Posted September 5, 2018 Report Share Posted September 5, 2018 hello dears I have problem to devide a circle to equal parts in labview any body has any idea ? Quote Link to comment
Benoit Posted September 5, 2018 Report Share Posted September 5, 2018 (edited) I think it is not related to this tread. please start new tread. Please be more specific when asking for support so we can help you. Benoit Edited September 5, 2018 by Benoit 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.