LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Level priority of drawn items

Hello,
I am using PlotXY, PlotLine, PlotOval, PlotPolygon functions to draw some staff on a graph. The drawing order is not sequential. Is there a way to set the level priority of a drawn item? Let's say if I draw some dots by using PlotXY, and later used PlotPolygon to draw a polygon on the same are, I want the dots still to be on the top. How can I do this without redrawing the dots? Can anyone help please?
Thanks,
Edgar TH
0 Kudos
Message 1 of 7
(3,974 Views)
Hello Edgar.

If you want to control the "z-plane" order of your plots on a single graph, you need to call the plot functions in order from "bottom" to "top"; this means that you will need to maintain all of the source data until you are done drawing.

If this is not possible, you could experiment with multiple overlaid graph controls with transparent plot areas (difficult to handle if rescaling, zooming or panning).

Regards,
Colin.

Message Edited by cdk52 on 06-20-2006 10:22 AM

0 Kudos
Message 2 of 7
(3,969 Views)
Edgar,

Colin is correct, in that the initial z-plane order of the plots is the order in which you plot them. But if you can't plot them in the desired order, or if you want to change it later, there is a plot attribute that you can use for this:

SetPlotAttribute (panel, control, plotID, ATTR_ZPLANE_POSITION, newPosition);

Luis
0 Kudos
Message 3 of 7
(3,959 Views)

Thanks,

Yes, I had to use SetPlotAttribute to push the specific plot on the top.

Edgar

0 Kudos
Message 4 of 7
(3,950 Views)
Good pickup, Luis. I didn't know about that attribute! By the way, its name is ATTR_PLOT_ZPLANE_POSITION.

Sorry about the wrong advice, Edgar. I'm glad you solved your problem.

Regards,
Colin.
0 Kudos
Message 5 of 7
(3,931 Views)

Thanks cdk52, this helped me a lot.
THere is a fault in the function panel and help file  (of CVI 8.0) where ATTR_ZPLANE_POSITION is mentioned instead of ATTR_PLOT_ZPLANE_POSITION.
I was also wondering why it didn't work. With the correct attribute everything is fine! Thanks!

regards
Torsten

0 Kudos
Message 6 of 7
(3,753 Views)
Colin, Torsten:

Sorry about the wrong name in the documentation. We corrected that in 8.1.

Luis
0 Kudos
Message 7 of 7
(3,741 Views)