LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What do you think is best way to overlay an XY plot onto Intensity Graph?

Solved!
Go to solution

Right now, I have chosen door #1 but will at least try to put the equivalent together with door#2.

 

 

 

Thanks for great ideas.

 

Sincerely,

 

Don

Message Edited by DonRoth on 12-23-2008 09:56 AM
Download All
0 Kudos
Message 11 of 25
(3,582 Views)

I think I misunderstood the problem. In your example, the XY graph is overlaid on the intensity graph and the XY scales are hidden. While I keep the XY graph scales and hide the corresponding intensity graph scales !

 

I have done a quick modification of my vi to retrieve the specific properties of the intensity graph.  There is some additionnal work to match the XY graph scales with those of the intensity graph.

 

Message Edité par chilly charly le 12-23-2008 07:20 PM
Chilly Charly    (aka CC)
Download All
0 Kudos
Message 12 of 25
(3,568 Views)

Yes, now you are understanding correctly.

 

But to incorporate the movement and resizing of the XY graph within the Intensity Graph by drawing the XY graph using plot.images property may not be quite as straightforward or efficient as the first method.  It was the plot.images property that I was first considering using when I talked of doing draws on the intensity graph.

 

Sincerely,

 

Don

0 Kudos
Message 13 of 25
(3,555 Views)

Personally, I would use the existing intensitiy chart and plot the line over it using "plot images" feature. No overlapping controls needed.

 

 

 (Here's a very rough draft (LV8.5). You probably want to use DBL for the  v-scaling and convert inside the loop to I16. Some of the math is currently ugly, so modify as needed :)))

 

 

Message Edited by altenbach on 12-23-2008 02:19 PM
Download All
Message 14 of 25
(3,553 Views)

Sorry, the defaults for the attached image is different to the defaults in the attached VI. For the image I used:

 

HScale = 204

HPos   = 286

VScale =  -4

VPos   = 133

0 Kudos
Message 15 of 25
(3,547 Views)
At runtime the graphs are not going to change in size, so having overlapping graphs is a very feasible and simple solution. It has the advantage of not requiring one to have to go through and redraw a curve that the XY graph does automatically. However, one key drawback is that if you want to save the image of the graph you won't be able to do it easily since you have two different graphs. In the end, you will need to decide which solution is best for you. In my opinion, any of the solutions provided is perfectly acceptable.
0 Kudos
Message 16 of 25
(3,531 Views)

Overlapping/transparent controls are a horrible pain during editing and also probably impair FP redraw speed during running.


smercurio_fc wrote:
It has the advantage of not requiring one to have to go through and redraw a curve that the XY graph does automatically.

 

 The plot images method is equally permanent. Once you draw the line, you can redraw (change) the data of the intensity graph and the line will remain. Similarly, you can redraw the line without updating the intensity data. 🙂 (Sorry, maybe you had something else in mind with the above sentence?)

0 Kudos
Message 17 of 25
(3,528 Views)

altenbach wrote:

(Sorry, maybe you had something else in mind with the above sentence?)


I did. I was referring to not needing the code that's required in order to draw the picture. I'm not really advocating the overlapping/transparent controls as a superior solution. It's an alternate solution which, in my opinion, is a perfectly viable one. As long as the OP is aware of the advantages and disadvantages of the various methods I'm sure they can choose the method most appropriate for them. 

0 Kudos
Message 18 of 25
(3,524 Views)

I have always been fond of the graph draw capability since it was introduced.  It has really come in handy, allowing me to do tricks with graphs that before I needed to do with the picture control.  Before this capability, I was at one time drawing on graphs using dot cursors!  So the option that Christian presents is quite a good solution and probably similar to what I would have arrived at as noted in my original post.

 

But for this application, the spectrogram recalcuation will not be drastically affected by an overlying transparent control and I like it as a brute force solution.  One thing it does prevent is the ability to change the maximum and minimum values on the Y-scale of the spectrogram since the XY graph is on top of the spectrogram.  I suspect Christian also discovered this.  The workaround for this is to just use controls on the front panel to allow graph range editing.  Of course for some this would immediately rule out the XY graph overlay as a plausible solution.  For my application, I need these controls anyway because I also have an option for the user to display the spectrogram as a 3D surface where the only way to customize the X, Y, Z ranges is thru front panel controls (at least as far as I know).

 

Sincerely,

 

Don

0 Kudos
Message 19 of 25
(3,496 Views)
ps. Very clever of you Christian in terms of normalization and manipulation of the plot line in preparation for the draw.....Don
0 Kudos
Message 20 of 25
(3,493 Views)