|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
XY Graph With 2 Different Colors
Hi there,
I'm trying to set up an XY graph in labVIEW to display the desired position of our arm, relative to our joysticks. I have all the code to draw it, and it looks really cool. However, I'd like to also have the actual position of the arm on top of it, in a different color. I can use the exact same code to draw it, but I don't know how to get the second color on it. If there's some way to make it transparent and hide the background, or just set each point to be a different color, that would be great. I'll attach what I have so far. If you can see any way to optimize it (it currently takes about a half millisecond) or make it simpler, that's be great also. Thanks in advance! |
|
#2
|
|||||
|
|||||
|
Re: XY Graph With 2 Different Colors
I haven't looked at your code but I'm assuming it works. Making a multiplot grpah in labview is pretty easy. All you need to do is bundle two or more single pot graphs. Just take the single plot XY graph (I'm not sure if it's an array or bundle of the top of my head) that you were feeding directly in to the plot XY graph indicator, duplicate it changing values, ect, so it graphs what you want, and then bundle the two together. All you have to do then is feed this bundle in to the plot XY graph indicator.
As far as color changes and such go if on the front panel you right click on the XY graph and select preferences there are a bunch of options you can mess with there. |
|
#3
|
|||
|
|||
|
Re: XY Graph With 2 Different Colors
If you programmatically want to set two different colors, you can set the Active Plot property to the 0 or 1 plot index, and then set the color. You can also just do this interactively with the graph itself. Show the plot legend and click on a plot to change style, show points, change colors, etc.
Greg McKaskle |
|
#4
|
||||
|
||||
|
Re: XY Graph With 2 Different Colors
Quote:
What exactly does the active plot property do? Should I use it for this application? |
|
#5
|
|||
|
|||
|
Re: XY Graph With 2 Different Colors
Each plot has a line and point color. A graph can have as many plots as you like, so the typical pattern is to separate the points into different arrays based on whatever the color represents. Then set the colors on the plot and put a different array to each plot.
It would sometimes be nice to be able to change the properties of a specific point on a plot, but the LV graphs were designed way more for performance than presentation flexibility. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|