ajwhi3 Posted December 11, 2007 Report Share Posted December 11, 2007 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 Quote Link to comment
gleichman Posted December 12, 2007 Report Share Posted December 12, 2007 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 Quote Link to comment
ajwhi3 Posted December 12, 2007 Author Report Share Posted December 12, 2007 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 Quote Link to comment
gleichman Posted December 12, 2007 Report Share Posted December 12, 2007 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! 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 Quote Link to comment
ajwhi3 Posted December 13, 2007 Author Report Share Posted December 13, 2007 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 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.