Go to Post In no way is my team a powerhouse but we're striving to compete among the top competitors and in my opinion that's a start. - rcmolloy [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-02-2011, 02:21
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
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!
Attached Files
File Type: vi Arm Viewer Preview.vi (14.8 KB, 57 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2011, 08:33
MaxMax161's Avatar
MaxMax161 MaxMax161 is offline
Allegedly Useful
AKA: Max Llewellyn
FRC #2791 (Shaker Robotics), FRC #1676 (Pascack π-oneers)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Montvale NJ\Troy NY
Posts: 174
MaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond repute
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.
__________________
2791 Shaker Robotics (2013-present)
--Control Systems Mentor 2013-present
--Drive coach 2015-present

1676 The Pascack π-oneers (2010-2013)
--Drive coach 2011-2013
--Lead Programmer 2011-2013
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2011, 09:16
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2011, 23:18
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: XY Graph With 2 Different Colors

Quote:
Originally Posted by Greg McKaskle View Post
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
Hmm, I think you're telling me how to change the color of the points, which I figured out already. I really want to have some points be one color, while, at the same time, have other points be a different color on the same graph (or two graphs but one with a transparent background).

What exactly does the active plot property do? Should I use it for this application?
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2011, 18:20
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi