I'm plottng monetary data with gnuplot and currently I've managed to set the labels on the y axis to be floating point values with no decimals (rather than exponentials) but I want to be able to add comma's to the label but I cant figure out how.
Any ideas?
i.e. The current output gives me £25000000 - as you can see, the data isn't grouped - I want to split it in thousands so it appears as £25,000,000.
EDIT: My current setting is
set format y '£%.0f'
As stated here the thousands separator depends on the locale-specific formatting.
If this setting allows for the thousands separator it will be printed with:
set decimal locale
set format y "%'g"
plot 1000*x
An other option would be to set the ytics manually (see here) like so:
set ytics ("5,000,000" 5000000, "10,000,000" 10000000, "15,000,000" 15000000, "20,000,000" 20000000, "25,000,000" 25000000)
plot[0:3] 10000000*x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With