Jump to content

XY Graphing Trouble


ajwhi3

Recommended Posts

Hello Everyone,

I have recently started a new job which requires me to use Labview and i must say that my programing is a little rusty, so hopefully someone here can lend a hand. I need to create two plots on the one graph spiltting the source data into two seperate colors depending on whether the gradient of the x value is positive or negative, i have tried to create a mathscript node to govern this but am having no luck, any help anyone could offer would be greatly appreciated.

Cheers

Adrian

Link to comment

QUOTE(ajwhi3 @ Dec 10 2007, 06:37 PM)

Hello Everyone,

I have recently started a new job which requires me to use Labview and i must say that my programing is a little rusty, so hopefully someone here can lend a hand. I need to create two plots on the one graph spiltting the source data into two seperate colors depending on whether the gradient of the x value is positive or negative, i have tried to create a mathscript node to govern this but am having no luck, any help anyone could offer would be greatly appreciated.

Cheers

Adrian

Are you trying to plot one array of values in two different colors where the color indicates the gradient? If so, make a two copies of your array and replace the indicies in the first one with negative gradients with NaNs and in the second array replace the positive gradients with NaNs. NaN = Not a Number which can be typed in directly in a numeric control or constant.

- Alan

Link to comment

Thanks for the relpy, i managed to create multiple arrays with the gradient split between them, all i have to do now is figure out how to plot a multiplot inside a for loop using a property node (i know this is simple but it just doesn't want to work for some reason). Thanks again

Cheers

Adrian

Link to comment

QUOTE(ajwhi3 @ Dec 11 2007, 05:22 PM)

all i have to do now is figure out how to plot a multiplot inside a for loop using a property node

Noooooo! :nono: Don't use a property node for updating control data. Just wire your array to the graph and don't do it in a for loop unless you want it animated. If your graph is not showing the data correct (transposed?), look at the help for your control type on how the data should be formatted.

-Alan

Link to comment

Its okay i got it all working finally, i had to use a property node as i was plotting arrays of data across 5 different graphs bundled into a local variable. Sorry if that sounds messy my lingo isn't the best, anyway after many hours and the addition of a few shift registers i am up and going. Thanks for the help i think i have learnt more about programming of these fourms in a day than in an entire degree.

Cheers

Adrian

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.