LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple background colors on a graph -OR- Plotting point fill *behind* the grid lines

Solved!
Go to solution

I've got a bit of an aesthetics question.

 

I have written a program which display data from binary files. These binary files hold chunks of data, an hour or two each. Each chunk corresponds to a reading window, and there are a handful of reading windows per day.

 

The display of the data is already implemented, what I'm working on now is a more intuitive way of selecting which data is to be displayed. 

 

My goal is to have a waveform graph with the X axis representing an entire day (hr 0 - hr 24), and on the graph is indicated which windows of time are available for review, ie data has been collected. The background of a "collected" window will be yellow (or some other color), while times during which no data was collected will be black. The user will then drag cursors to select the window he/she wants to see data from.

 

This was easy enough to accomplish by graphing a digital signal (1 for data collected during this time, 0 for not) and point-filling with yellow to zero. My only issue with this solution is that the point fill appears on top of the grid lines, which just doesn't look quite right.

 

Is there any easy way to get the grid to appear on top of the graphed data, or is there a way to programmatically set multiple background colors (this could accomplish the same thing)?

0 Kudos
Message 1 of 8
(3,960 Views)

Change the order of the data plots in the graph. It's been a bit since I have played with this but I think Z-axis wise, plot 0 is on the bottom and plot n is on the top - but it could be the the other way around too...

 

Mike...

Message Edited by mikeporter on 01-07-2009 11:44 AM

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 8
(3,956 Views)

Mike:

Thanks for the response. Unfortunately my issue isn't graph data covering up other graph data, it's that I'd like to be able to see the Major/Minor grid lines on top of my graph data. The grid lines seem to be stuck in the background, though, and all wired data is plotted on top of them.

 

0 Kudos
Message 3 of 8
(3,953 Views)

Oh, I see. Yes you are correct, the grid lines are stuck at the back. It would be nice if that behavior was settable.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 8
(3,948 Views)
Solution
Accepted by topic author AlexK
Use the "plot images" property and draw your own grid as a front image.
Message 5 of 8
(3,947 Views)

Changes to the native behaviour of LV objects is seldom simple. If I was forced to do this I would try to take advantage of the background image that is now available in LV 8.+

 

So maybe two graphs.

 

1) only has your plots.

 

2) Use the image from #1 and slips itno its background leaving the grid lines on top.

 

Boy would that be a lot of work to make it work, particularly if you wanted to maint zooming, auto-scales and plot properties! Smiley Mad

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(3,944 Views)

You could also create additional plot lines that are appear as grid lines. This would allow zoom to continue to operate as expected.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 8
(3,939 Views)

Good suggestions guys, kudos all around. I think I'll go with making my own grid lines and plotting the image in front, since zoom and auto-scaling aren't requirements.

 

This just might work after all.......

0 Kudos
Message 8 of 8
(3,932 Views)