Lance wrote:In the Windows Control Panel there is a section for Region and Language settings. This is where you would set stuff like that.
Lance wrote:Sounds like it must be a parameter of the library then. You're outside my skillset.
reset
set terminal pdfcairo enhanced color dashed
set output "Rubbish.pdf"
set decimalsign locale "en_GB.UTF-8"
set border 31 lt -1 lw 1
set key bottom right
set xrange [3:7]
set yrange [0:200000.0]
set xtics nomirror 1.0 font "Helvetica,9"
set ytics nomirror 0.0,10000.0 font "Helvetica,9"
set format x "%1.0f%%"
set format y "$%'1.0f"
Мастер wrote:Lance wrote:Sounds like it must be a parameter of the library then. You're outside my skillset.
I think it is, but I don't know how to set it.
Here is the beginning of a script which works on Mac OS X.
- Code: Select all
reset
set terminal pdfcairo enhanced color dashed
set output "Rubbish.pdf"
set decimalsign locale "en_GB.UTF-8"
set border 31 lt -1 lw 1
set key bottom right
set xrange [3:7]
set yrange [0:200000.0]
set xtics nomirror 1.0 font "Helvetica,9"
set ytics nomirror 0.0,10000.0 font "Helvetica,9"
set format x "%1.0f%%"
set format y "$%'1.0f"
This is (the beginning of) a script which is compiled to produce a PDF file, containing a graph. The critical line is the last one, which includes a quote mark in the C format string. But including the locale statement near the beginning is also necessary - I don't get the commas without it.
But the result of compiling this on a Windows machine is that the numbers don't get the thousands separator, whereas under Mac OS X, they do.
So I don't know whether a) there is no way to do this under Windows, or b) there is a way, which is different than the Mac OS X way. Haven't been able to find anything at U. Google.
MM_Dandy wrote:I found some chatter about using various identifiers to get the used locale to map properly to a locale supported by the Windows OS - but none of that seemed to actually resolve the thousands separator issue. MSDN on the setlocale method. MSDN of supposedly supported Country/Region strings.
Is it possible to include third party libraries? If so, you might be able to use the [url=http://msdn.microsoft.com/en-us/library/windows/desktop/dd318110(v=vs.85).aspx]GetNumberFormat function[/ur].
Lance wrote:Does this help: Commas in gnuplot labels
Lance wrote:If this is something you'll need often you could install a Linux virtual machine on your Windows PC. Virtual Box is great and free.
Lance wrote:Hey, here's another. Look toward the bottom.
http://stackoverflow.com/questions/2232 ... t-grouping
Lance wrote:I think you missed this. It gives a work-around near the end of the page.
Return to Computers and Gadgets
Users browsing this forum: No registered users and 1 guest