LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot Graph with Explicit X-axis values and Report with Explicit X-axis Title

Solved!
Go to solution

Hi all!

While working with graphs and report generator toolkit, I am facing two issues.

In the report generation in Excel, it's actually making nice graphics, but somehow I don't see the option to add a title for "X axis" or "Y axis". There is an option for Graph Title, but not for the Axis title. See the image please.

Report.png

 

The second issue is with the Graph control/indicator.

As you can see in the above image, the X axis has data points which are not like index (0-n) but some specific points. In the Waveform Graph, I have to use only the two columns (the gray and blue data) and cannot use the data that has those values of X axis. So it generates the graph, but not quite as I would like it to be. As in the following image.

WaveformGraph.PNG

 

I cannot find a property value to assign the explicit values to X-axis. I am not talking about the range of X axis. I am talking about projecting my data on X axis (as in the first image above). Of course, unlike in the case of report generator, I am not providing the first colmn data, so obviously it's not going to project it. But I could not find how can I send that data to project as in the first image.

 

Here is my program.Graph Scale.png

 

Thanks ahead!

 

 

Vaibhav
0 Kudos
Message 1 of 22
(5,906 Views)
The first question sounds like an Excel issue.

In terms of your second problem, you are using the wrong XY Graph data type. If you check context help you will see that it supports several datatypes. The one I use a lot is a cluster containing an array of x values and a corresponding array of y values. A multiplot is then just an array of those clusters.

Mike...

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 22
(5,884 Views)
Solution
Accepted by topic author Vaibhav

Hi Vaibhav,

 

generic answer: use an XY graph when you want to plot XY data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 22
(5,881 Views)
Oops, my bad. I didn't notice that weren't actually using an XY Graph...

So replace the waveform graph like Gerd says, with an XY, ***then*** feed it the right data structure.

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 22
(5,865 Views)
Solution
Accepted by topic author Vaibhav

@Vaibhav wrote:

Hi all!

While working with graphs and report generator toolkit, I am facing two issues.

In the report generation in Excel, it's actually making nice graphics, but somehow I don't see the option to add a title for "X axis" or "Y axis". There is an option for Graph Title, but not for the Axis title. See the image please.

 

 


It's really counterintuitive, you need to use Excel Set Graph Font.vi (xlCategory for the x-axis, xlValue for the y-axis).

 

Ben64

Message 5 of 22
(5,843 Views)
Solution
Accepted by topic author Vaibhav

@Mike
@GerdW

 

Thanks. I had tried to XY graph before, but somehow I couldn't manage to present my data correctly, and the example of Waveform Graph convinced me it was easy.

But after your suggestion, read the help more carefully, and tried making the cluster array for multiplot (I was earlier trying with single plot, because I thought multiplot will make 2 separate plots in one window). And it works now as it shows in the Excel's chart.

 

 

@Ben

 

Yes, it's indeed counterintuitive. I always ignored that vi because I didn't want to set font. Smiley Frustrated

It works now.

 

Posting the updated program for anyone else learning about LabVIEW graphs and report generation.

 

Graph Scale.png

 

I would however like to make the Y-axis label (string counts) vertical. Couldn't find that option. Anyone?

Vaibhav
0 Kudos
Message 6 of 22
(5,809 Views)

@Vaibhav wrote:

 

I would however like to make the Y-axis label (string counts) vertical. Couldn't find that option. Anyone?


It is not available with the Report Generation Toolkit vis (althought in my opinion it should be since it is not a big modification of Excel Set Graph Font.vi). You will have to use ActiveX to do it.

 

Ben64

0 Kudos
Message 7 of 22
(5,723 Views)

ben64 escreveu

          You will have to use ActiveX to do it.

Ben64


Hi Ben,

Thanks for the suggestion.

 

But how is it possible? Because we're talking about a chart that is being prepared inside the excel, and the chart was already prepared in the report. Can you please give an example?

Vaibhav
0 Kudos
Message 8 of 22
(5,710 Views)

Use this vi. Set the axis type to xlValue and the orientation to xlUpward.

 

Ben64

Message 9 of 22
(5,692 Views)

Thanks Ben,

 

Can you please convert the VI to 2013? I still haven't got DVDs for 2014 onwards.

 

Vaibhav
0 Kudos
Message 10 of 22
(5,655 Views)