Search code examples
gnuplot

Small space in gnuplot


Does something like tiny space exist in gnuplot? I searching for something similar to, for instance, , in LaTeX.

set xlabel "2\,400\,000" 

Solution

  • Well, here is an awkward workaround without using a LaTeX terminal, but using enhanced text (check help enhanced).

    I assume you want a thousand separator. If you are working under Linux, the following might be of interest: gnuplot: How to enable thousand separators (digit grouping)?

    Script:

    ### small space between numbers
    reset session
    
    set termoption font "Arial,18"
    
    set label 1 at graph 0.1,0.9 "2400000"
    set label 2 at graph 0.1,0.8 "~2{.0}~ {.0 }40~0{.0}~ {.0 }000"
    set label 3 at graph 0.1,0.7 "2 400 000"
    
    plot x
    ### end of script
    

    Result: (from wxt terminal under Windows)

    enter image description here