LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Allow text labels for graph scales!

Status: New

Unlike the scales of numeric controls, graph scales don't support text labels (wouldn't that be cool! :smileywink: ) *(see footnote)

 

It could be handled very similar to the way text labels are handled for the scales of numeric controls, so most of the code is already there.

 

This would come in very handy for e.g. histograms or bar graphs, where each bar needs a text label, or for cases where we have arbitrary units.

 

Examples for integer scales: 

  • "January", "February", ...
  • "LabVIEW users", "CVI Users" ...
  • "Europe", "Asia", ...

 

Examples for floating point scales (x, or y):

  • "Too cold", "cold", "warm", "hot", "too hot"...
  • "small", "medium", "large", ...
  • "min", "max"...
  • "high frequrency", "low frequency"...

 

*My quote from this old discussion . See also Ben's example further down.

16 Comments
Erik Månsson
Member

I absolutely support this!

 

I also think it shouldn't be that hard to implement. There is already a property called "Scale -> Marker Values[]" (numeric) which, when arbitrary markers are enabled, allow you to select where (on the underlying linear or logarithmic scale) some markers should appear.

Then we just need a property "Scale -> Marker Labels []" (string) that allow us to overwrite what text is shown on the axis at these markers. When "Marker Labels[]" is an empty array LabView should, as now, use the underlying numbers.

 

Ideally, if the graph is zoomed out so that a label text can't be drawn without overlapping the previous, a simple solution is that LabView just skips the label texts until there is room again. (The text extent is known when you draw to to the screen.) Ther marker ticks can still be drawn, so you know some texts are missing.

 

Some discussions that I found which would have been solved if this idea was implemented:

 

http://forums.ni.com/t5/LabVIEW/Allocate-arbitrary-string-to-Marker-in-X-Y-Graph/m-p/638031

http://forums.ni.com/t5/LabVIEW/How-to-display-both-wavelength-and-wavenumbers-on-same-xy-graph/m-p/...

http://forums.ni.com/t5/LabVIEW/How-can-I-add-custom-captions-to-a-waveform-graph-scale/m-p/959917

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Custom-Axis-Mapping/idc-p/1238380

http://forums.ni.com/t5/LabVIEW/Unlink-x-axis-marker-values-from-graph-scale/m-p/136284#M81858

http://forums.ni.com/t5/LabVIEW/How-do-I-create-a-non-linear-not-log-y-axis-scale-on-a-graph/m-p/208...

http://forums.ni.com/t5/LabVIEW/Myself-values-on-XY-axes-markers-in-intensity-graph-How-to/m-p/31751...

http://forums.ni.com/t5/LabVIEW/Having-trouble-creating-bar-graph/m-p/636848

simplemaan
Member

I like this idea a lot and it would be nice if, for instance, you want to display an overlay of line plots where the x values represent sensor location, but the y values are from different points in time, which is a different thing than a histogram.

 

But for histograms, audio equalizers, FFT bins, etc, it would also be nice to simply have a histogram or bar/column graph that was driven by an array of values and an array of x-axis names.  Excel has it.  It could re-size the number of bars/columns by the size of the array.  Additional variations like stacked bar plots, High/low limits plots, etc could be driven by 2D values arrays.

WG-
Member
Member

 

NI why you guys don't support this yet. Shame on you.

RustyStrings
Member

I wish there was a bar char with labels on the x axis

 

I am implementing a program that displays histograms and I have to work around the fact that this display mode does not exist

the original display is an excel spreadsheet with the bar charts nicely labeled

 

I am embarrassed to have to say LabVIEW can't do this

ChrisLudwig
Member

We are still waiting for this feature.  Give me a property node at least that lets me set an array of strings that corresponds to the array of data that I put on the chart.  The lack of this feature is very limiting when trying to make summary data plots.

SalacLV
Member

I needed this several times and I need it again. Always workaround.

jaccgp
Member

Hi all,

about the bar graphs, it is possible to use an array of clusters, with a string, a label and a vertical progress bar, it is not the perfect solution, but it is simple and it works, maybe it is a good point to start to resolve our deman, if it can be done qith te existing elements it must be to easy to LV to add a Bar Graph to the palette.

 

And the text labels for all the graphs scales is a general demand, please add this feature.

 

Smiley Happy

 

This is the example for the bar graph alternative:

2016-06-10 11_25_43- [prueba_9.vi].jpg

 

best regards

Jose

 

altenbach
Knight of NI
Well yeah, this is basically the same as in my "this very old discussion" I linked in the idea. 🙂
jaccgp
Member

oh, I'm so sorry Altenbach.

Smiley Embarassed

 

I don´t follow the link to the "old discussion" because i thougth it was obsolete, but now i see there is no news, from Labview, about this issue since 2008,  too much time!!!

 

best regards

Jose

ChrisLudwig
Member

The solution I used works, but only just.  I oriented my graph with the y-axis as the independent variable and the x-axis as the dependent variable (a vertical graph, instead or the normal horizantal).  I plot individual points.  I then put the desired names for the independent axis in a 1-D string indicator array.  I then use property nodes to size the 1-D array to the number of elements and then size the plot top and bottom to the top and bottom positions of the 1D array.  It takes a bit of fiddling to get it all to line up.  I then set the front panel bounds based on the bounds of the array and the plot.  I then take a picture of the front panel, then rotate that 90 degrees, then I save that image to disk (saving the image to disk is the clients desired data output for inclusion into a report).  

 

So, I make a report formatted plot, but the programming hours to do so were unacceptable.  The program is automating a data presentation for a government compliance report, so my effort saves the client far more effort so, it was still a net cost savings.

 

My method only works in a reporting program.  It would not be acceptable to display live data using that many property nodes (blocking nodes should never be placed in a high frequency loop).

 

I don't see the option to post my subvi here, but I could send it to anyone that sends me a PM.  For a real time solution, Jose's method would be better to eliminate the property nodes.

-2.png