Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot datetime against temperature in waveform chart

Solved!
Go to solution

Hi Guys,

 

I am trying to plot data from my table, and want to plot a date time value on the x axis and the temperature value which will look like 32.5c

on the y axis on a waveform chat. I am new to measurement studio, anyone have an example on how this is done?

I have a for loop which loops and gets the data from each row ( the time and temp) and i want to plot in each loop as i go,

so the graph will be building, and the user can see it building until i have read all the records.

 

0 Kudos
Message 1 of 6
(4,261 Views)

Hi lil_racoon,

 

A waveform chart normally uses a 1D array with indexes and you can manually adjust the x-axis.  If you are looking to plot data from a 2D array you will want to use the scatter graph and make a scatter plot. I would take a look at this tutorial on how to create custom scatter plots and waveform plots.

Ryan T
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(4,249 Views)

Thanks, will take a look, is it possible in scatter groph to plot against a datetime on the xaxis? or it has to be numeric values

0 Kudos
Message 3 of 6
(4,247 Views)

Also in scatter graph u can plot with x y however it takes only a double value for x, and i have a date time value for my x, do i have to convert that to seconds? if so i want this to be represented as a date time value on ma x range rather than in seconds

0 Kudos
Message 4 of 6
(4,245 Views)
Solution
Accepted by topic author lil_racoon

Hi lil_racoon,

 

Thank you for the additional information.  After looking at what you are trying to do, I beleive that the attached code will accomplish your goal.  Try to adjust it to work for your application.

 

Thanks

Ryan T
National Instruments
Applications Engineer
0 Kudos
Message 5 of 6
(4,223 Views)

Thank you so Much Ryan! =D thats exactly what i want! Smiley Happy

0 Kudos
Message 6 of 6
(4,216 Views)