Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Labelling graphs/images with text() function

  1. Mar 3, 2009 #1
    Hi, I'm plotting some circles in a 20x20 arrangement using the rectangle tool and I have to label each of the circle a number from 1 to 400. However, the following code does not do what i once, since i think i can only label with strings and not running numbers...

    Code (Text):

    for i=1:400
    What else can i try? Thanks!
  2. jcsd
  3. Mar 3, 2009 #2


    User Avatar
    Science Advisor
    Gold Member

    You could just convert the number to a string using the num2str function.
    Look it up in the help.
  4. Mar 3, 2009 #3
    thnx f95toli this works!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Labelling graphs images Date
Mathematica Labeling plots Feb 23, 2018
Putting Excel graph into LaTeX Feb 10, 2018
How to label equations in Latex? Sep 8, 2017
Mathematica Labeling Plot May 23, 2017
Excel Plots Labels Jan 5, 2017