Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rounding values (less decimale points) in map legend using spmap

    Dear all,

    I am creating maps using the user written programme spmap (see ssc install spmap). My code looks as follows

    Code:
     
    
    spmap x using "file", id(_ID)     ///  
            fcolor(Blues)  ///
            clnumber(9) clmethod(quantile) ///          
            title("x", size(small))
    Everything works fine, except the values in the legend have eight decimal points. How can I round the values so that I only have two decimal points?

    I working with Stata 15.1 on Windows 10.

    Thank you!
    Stephanie

  • #2
    Hi Stephanie,

    you can use the following code before the spmap

    format (your variable) %12.2f

    or all the option format gives.

    Hope this helps.

    Rosario

    Comment


    • #3
      Great - it worked!
      Thanks a lot for your quick response!

      Comment


      • #4
        Ivano Scandurra Many thanks!

        Comment

        Working...
        X