LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word Insert Graph.vi

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

 

 

Dan
CLD
0 Kudos
Message 1 of 5
(3,359 Views)

Hi Dan,

 

you can remove the empty element from the middle of the array .

 

Try this vi.

 

 

0 Kudos
Message 2 of 5
(3,324 Views)

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

Dan
CLD
0 Kudos
Message 3 of 5
(3,317 Views)

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


Philip
Applications Engineer
National Instruments
UK Branch

===If this fixes your problem, mark as solution!===
0 Kudos
Message 4 of 5
(3,252 Views)

I haven't tried it, but could you insert NaN for your null data?

0 Kudos
Message 5 of 5
(3,245 Views)