LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

sectioning a graph

Hello. I have a question making different colored sections of a graph. I currently have a graph set up in my .uir and I use PlotLine to display three different lines on the graph. I wanted to know if there's a way to divide the graph into 3 sections. I am displaying 3 phases of a cycle on a machine and horizontally I would like to have the graph backgroud be light gray from 0 to 60 secs, white from 60 to 240secs, and light gray from 240 secs on. Is there any way to do this? If not, I thought I might have to make three separate graphs and display them side by side. Any help would be greatly appreciated. Thanks, Jason
0 Kudos
Message 1 of 3
(2,629 Views)
Jason,

The best way I know of to do this is to create a bitmap (I just used Microsoft Paint, it works well)using the pattern/colors you want, and load this into a Picture control. Then position this behind the graph, and make the graph transparent using the following tip in this KnowledgeBase article:

http://digital.ni.com/public.nsf/websearch/8F5D605F1941771A86256B29000B7FE0?OpenDocument

Hope this helps!

David McClelland
National Instruments
0 Kudos
Message 2 of 3
(2,629 Views)
From your description, it seems that making three calls to PlotRectangle, passing it different colors each time, should do the trick. Would it?

Luis Gomes
NI
0 Kudos
Message 3 of 3
(2,629 Views)