Announcement

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

  • Space as thousand separator in "format"

    Hi,

    Is there any way I can use space separators for thousands instead of commas or dots? In "format" I can easily switch to dots, but is there a way I can format "10,000" as
    "10 000"?

    I need it for a graph, in which I cannot change manually the value labels.

    Thanks!

  • #2
    There's no accounting for taste!

    I don't understand the last sentence, but let's suppose you want to show 0(10000)50000 with spaces before the 000.

    Code:
    forval  j = 10000(10000)50000 {
        local J = `j' / 10000
        label def x `j'  "`J' 000", add
    }
    
    label val x x
    
    twoway scatter y  x, xla(0(10000)50000, valuelabel)
    Last edited by Nick Cox; 27 Mar 2024, 04:27.

    Comment

    Working...
    X