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: 

Automatically place a marker on a graph

Solved!
Go to solution

How can I automatically place a "marker" on an XY graph? I want to highlight a few points on the graph were other events take place.

 

I would like to place a marker and a note at that point like "X happened here" and "Z happened here" as the chart is being generated.

 

The chart is exported to an image at the end and this is given to customers who are interested in when these event occurred.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 5
(4,644 Views)
Solution
Accepted by RTSLVU

I believe you want a "Cursor" not a "Marker". Check out the "Cursor List" property of the "XY Graph", found by right clicking the block diagram terminal of the graph and selecting "Create" then "Property Node" then "Cursor List". This allows you to read or write all cursors of the graph. If you have user created cursors already there that you aren't able to mess with, read the "Cursor List" first (read write can be selected by right-clicking the property that you wish to change and selecting "Change to Read" and "Change to Write" respectively), then add your new cursor to the array using either insert into array or build array (insert into is my preferred). The "Cursor List" property is an array of clusters giving you the ability to set way more information about the cursor than you probably ever wanted to, including whether or not to display the text on the cursor, text offset from center, color, xy position etc... Let me know if I can be of more assistance.

 

Charles Chickering

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 2 of 5
(4,638 Views)

You have significantly mor flexibility using the "plot images" mechanism. It allows you to use any image tools to draw lines, circles, polygons, text, etc. 

There are two shipping examples and also some examples here in the forum. Do a search!

(Sorry, i am posting by phone, i'll give some links later if needed).

 

You were talking about xy graphs, i assume you did not really mean "chart" in your last paragraph.

0 Kudos
Message 3 of 5
(4,630 Views)

@altenbach wrote:

You have significantly mor flexibility using the "plot images" mechanism. It allows you to use any image tools to draw lines, circles, polygons, text, etc. 



I do not understand what you mean be "plot images mechanism". I would like the cursors to be placed automatically by the program so they are on the graph when the image is exported.


altenbach wrote:

You were talking about xy graphs, i assume you did not really mean "chart" in your last paragraph.


 

Chart, graph? Graph, chart? I know there are subtle differences, but yes it is an XY-Graph, the customers and my managers call it a chart, I tend to use the two words interchangeably...

 


altenbach wrote:

There are two shipping examples and also some examples here in the forum. Do a search!


I did search, and found nothing.
In general I have not found NI's examples to be very useful when you do not know how to do something. They always seem to use some "Magic VI" to make their examples into perfect demo's. But then it does not translate to a real world use.



========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 5
(4,604 Views)

(A chart has a very special meaning in LabVIEW. It typically takes a scalar instead of an array, keeps an internal history buffer of a given size, and shows the last N points, discarding the oldest data when new points arrive. Charts cannot have cursors.)

 

The two examples are called:

  • plot images.vi
  • Graph plot area Images.vi

 

They are easiest to find if you search for the keyowrd "image" in the example finder. (Yes the keyword search sucks).

 

For more examples, look at the links here, here, or here, for example


 

0 Kudos
Message 5 of 5
(4,600 Views)