ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph Multi Plot - Data does not Match Graph

Solved!
Go to solution

I am trying show two plots on an XY Graph and the data I feed into the graph does not match what the graph shows me. When I right click the graph and export the data to excel the numbers are correct but the image seems wrong because the points do not align with the X values.

 

X1 Y1 X2 Y2
2017-12-21 85 2017-12-21 54.4156
2017-12-22 85 2017-12-22 47.3879
2017-12-27 85 2017-12-27 54.6753

 

Why would my X values on the graph be shifted?

0 Kudos
Message 1 of 5
(3,807 Views)

These are dates, so what is your timezone? Can you show us your code?

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

I have attached a picture of the code I am using. I am reading data from a database and the cut off wires are just a query. 

 

My timezone is US Pacific.

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

If you scan a time, it assumes GMT. If you want to graph relative to your timezone, you need to adjust accordingly.

0 Kudos
Message 4 of 5
(3,768 Views)
Solution
Accepted by topic author JohnSutton

I solved the problem. I was trying to graph just with date and I had time unused selected on the graph but LabVIEW didn't like that and set all the time stamps to 4PM for some reason. I added a segment that sets all the times to midnight before they get to the graph so the data shows up above the correct date.

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