04-09-2010 03:27 AM
Hi,
I currently use the NI_Word.lvclass:Word Insert Graph.vi to insert some graphs into a document.
I pass the data to this VI as a 2D array, where the top row of the array represents the x-coordinates, and the other rows represent the y-coordinates. The particular graph in question has multiple plots, where each plot is represented by a given row of the array.
This works fine, unless I want omit a given point of a particluar row/plot. As it is not possible to have an "empty" element in the middle of a 2-D array, I don't know how to pass the data to the VI.
If I set the element to zero, this has the unwanted effect of plotting a zero point on my graph.
See the respective attachments to illustrate my point.
Cheers,
Dan
04-09-2010 04:39 AM
04-09-2010 05:03 AM
Thanks for the response.
However, this does not do what I want it to.
Your VI deals with strings, whereas I need to deal with numbers.
With an array of strings, it is permissable to have an empty element (i.e. an element consisting of a blank string). However, this is not allowed in a numeric array.
See the attachment for an example of an array I would pass to the Insert Graph VI if I could.
However, I realise this is not possible, so I am looking for a way around the problem. I think this is more a question of programatically manipulating graphs in Word, than an array issue.
Cheers,
Dan
04-14-2010 05:24 AM
Hello DanB1983,
You will not be able to reinitialize just a single element of an array and as you have mentioned you cannot put in a value of 0. To omit a point you will need to replace the value with an average of the two points ether side of the omitted value. This will result in the graph having the correct transition over the omitted Y value.
With regards,
Phil
04-14-2010 06:13 AM
I haven't tried it, but could you insert NaN for your null data?
b