LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically changing the common plot types

Hi,
 
Is it possibe to programatically change the plot type.
 
ie,selecting line/bar..
 
Its possibe by right clicking the plot legend,taking common plot and selecting the appropriate one.
 
But i want to include it as an option in my application.
 
I saw the property node of the graph namely,plot.linestyle,plot.barplotstyle...will it work in the desired way?
 
Thanks in advance
0 Kudos
Message 1 of 9
(7,759 Views)
Have you actually tried it to see if it acts in an 'undesired' way?Smiley Very Happy
0 Kudos
Message 2 of 9
(7,747 Views)
Everything you can do manually with the plot legend, you can do programmatically with a property node. What makes you doubt this?
 
If you have more than one plot on your graph, your property node should start with property  "Active plot", followed by the plot properties, (plot.linestye for example).
WIre the index of the desire plot to the Active plot property, then the deseired styles, etc. to the following properties.
 
See how far you get. Good luck! 🙂
 
Message 3 of 9
(7,741 Views)
I understand user_1's confusion.  I don't see a way to change the 'common plot type' in the property menu.  All the other options are pretty obvious in the list of properties.  If I want to program for example that under certain conditions the plot is just a line, and other conditions the plot is a line with points, I don't see how to do this.  I can change thickness, line style, etc, but not the common plot type.  Is this property not in the 'Plot' menu of the Properties?  I'll keep looking...
Message 4 of 9
(7,634 Views)
Could you be looking for plot.interpolation or plot.point style?  See attached.
Message 5 of 9
(7,612 Views)


@l1k wrote:
I understand user_1's confusion.  I don't see a way to change the 'common plot type' in the property menu.  All the other options are pretty obvious in the list of properties.  If I want to program for example that under certain conditions the plot is just a line, and other conditions the plot is a line with points, I don't see how to do this.  I can change thickness, line style, etc, but not the common plot type.  Is this property not in the 'Plot' menu of the Properties?  I'll keep looking...


If you want to change the icons that show up in common plot styles: You can't!

That are simply shortcuts put in by the LabVIEW programmers that combine a certain setting for plot style, point style, line style, line width, etc under one simple user selectable icon.

If you want to change any of the settings of a particular plot however, you certainly can do that with property nodes.

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 9
(7,603 Views)
Ah ha!!!! I didn't realize the 'Common Plots' were shortcuts.  Since I wasn't the only one in my lab group to have this issue - I'll finish up this thread with a summary of what I learned (in case someone does a search in the future...)

To code into a property node the type of plot as defined in the 'Common Plots':
1. For a plain line (no points), define the Plot.PointSyle as 0, and Plot.Interp as 3.
2. For points (no lines), define the Plot.PointSyle as 2 (or greater depending on the style you want), and Plot.Interp as 0.
From there you can reproduce the other Common Plots pretty easily.

I was looking for something like Plot.Common, but I now see why there isn't one.  And, I didn't realize one of the options in the Interp and PointStyle was either no line or point.  Thanks for the help!

Message 7 of 9
(7,571 Views)
thank you ........... i was looking for this particular info......
0 Kudos
Message 8 of 9
(7,216 Views)

I just spent around an hour trying to find how to programmatically change the  Common Plot type in the LabVIEW help files. Thank you for this solution, works great!

0 Kudos
Message 9 of 9
(4,702 Views)