From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing Dates On the X-Axis

I am trying to create a plot if Std Dev Error versus Month data on a graph.   I am showing the last six month of data end at today's month.  I would like to show on the x-axis just the year and month.  I have include some code to start the process but cannot figure out how to show just year and month on the axis.  Any help would be appreciated,

0 Kudos
Message 1 of 4
(1,013 Views)

Instead of using Bundle Cluster, I would use Build Waveform.   But actually I wouldn't do that either.  I'll get back to that later.

 

Your issue is you have a dt of 2678400 which means 31 days.  You also have a multiplier set in the properties of the graph to 31.  So you wind up with each data point being 31 x 31 days apart, 961 days. or about 2.63 years apart rather than 31 days apart.

 

So to fix what you have, I would change to Build Waveform, and fix the graph properties to have a multiplier of 1.

 

But like I said that is still wrong.  Months aren't 31 days apart.  they are sometimes 30, and sometimes 28/29 days.

 

I would use an XY graph.  Keep your date of the specific data point in the array as well and wire the 2-D array to an XY graph.

0 Kudos
Message 2 of 4
(977 Views)

@RavensFan wrote:

 

I would use an XY graph.  Keep your date of the specific data point in the array as well and wire the 2-D array to an XY graph.


Right, an X/Y graph is probably the best option here.

 

Set your X-Axis using a property node and the XScale property Min/Max.

setchartCapture.PNG

This sets the X-Axis from Midnight to Midnight. I clear the graph and reset it at Midnight every night.

 

Use the graph properties Display Format to set the format to show only Month and day by selecting "Advanced Editing Mode" and setup a custom format.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(973 Views)

Thank you very much for your advise and help.

 

I was able to talk the information you gave me and solve my issue with year month on the x axis.

 

Thanks again.

 

Jim

0 Kudos
Message 4 of 4
(933 Views)