LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Font and Size of Graph Annotations

Just learned a cool little trick from Christina Rogers about how to change the font and size of a graph annotation after I left a comment on her blog (if you are unsure how to create a graph annotation, check LabVIEW Help).

 

With the Cursor Legend selected, use the Font Dropdown on the toolbar to select the font you want for the annotation. Apparently, annotation and cursor text on the graph inherit the font of the Cursor Legend. If you do not like how the Cursor Legend looks after you have changed the font, you can make it invisible again (I have never shown the cursor legend in final UI products... and I have never used "Hobo Std" in final UI products...).

 

AnnotationFont.png 

Message 1 of 12
(11,376 Views)

This is my workaround for the annotation font size issue. Note that PlotImages don't automatically follow the plot if x- or y-scale changes like the annotations do. If needed use mouse move or/and mouse up events to update the text position.

Annt text size workaround front panel.png

Annt text size workaround block diagram.png

Message 3 of 12
(9,175 Views)

Reviving an old thread in hopes of a simple answer. I used the above method and it worked perfectly. For the first annotation. The rest are all the default. I could create a ton of cursors so they link to each annotation but that would be in the 100's. My program counts tubes and annotates the graph when the tube changes. Am I missing something or is that the sad truth?

0 Kudos
Message 4 of 12
(8,677 Views)

Once you know how to do it for one, it is trivial to loop over an array of strings and positions to generate many more. 😄

0 Kudos
Message 5 of 12
(8,667 Views)

Hi p2kmafia,

Probably you just forgot to put the picture in a shift register. Below and attached a modified workaround for many annotations. Hope that it will help you achieve what you need.

Annt font size workaround 2.PNG

Annt font size workaround 2 front panel.PNG

Message 6 of 12
(8,628 Views)

how to put different colour for different text

0 Kudos
Message 7 of 12
(8,304 Views)

 Well in the VI above you see the green colour box at the bottom right of teh for loop?

Move it outside of the for loop as shown below, place it in an array and you need to have the same amout of items in this array as there are in the string array.

The "colour array" has to index at the loop border just like the string array does.

annot.png


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 8 of 12
(8,297 Views)

Hello jack

I have tried your way ;

Capture3.JPG

 

but as you see it didn't change the anotate lable font size !

Best Regards 

Morteza

0 Kudos
Message 9 of 12
(7,593 Views)

Hello Morteza!

 

This is a pretty old thread, not sure if Jack is still here. (Jack?)

 

What steps did you follow specifically and did you try any of the methods other people have posted on this thread?

0 Kudos
Message 10 of 12
(7,571 Views)