WebPlotDigitizer icon indicating copy to clipboard operation
WebPlotDigitizer copied to clipboard

Decimal separator - comma - dot

Open Elettrough opened this issue 8 years ago • 17 comments
trafficstars

After the new update it gives me numeric data with comma as decimal separator. Is it possible to format the dataset changing the decimal separator with a dot?

It is important to me cause the program I will use only support the dot. Thank you very much.

Elettrough avatar Nov 01 '17 10:11 Elettrough

Hello, what OS is this on and is your machine set to use commas for numbers (e.g. german locale)?

Maybe we need an option to switch which separator is preferred instead of automatically detecting.

ankitrohatgi avatar Nov 01 '17 13:11 ankitrohatgi

Sorry I didn't specify, I'm on Windows 10 using Chrome. My machine is set to use dot as decimal separator but I still obtain commas from WebPlot Digitizer "View data" and "Download as .csv". The only case where I got dot was downloading my data as "Export all data".

Thank you very much

Elettrough avatar Nov 01 '17 16:11 Elettrough

Can you try hitting "Run" here and let me know if the 1.1 has a comma or a decimal on your machine? http://jsfiddle.net/yyp184nb/

Thanks!

ankitrohatgi avatar Nov 01 '17 16:11 ankitrohatgi

It has a comma.

Elettrough avatar Nov 01 '17 16:11 Elettrough

I just tried "View data" and "Download as .csv" from the browser Windows Edge and it gives me numbers with dot. I don't really like that browser, but at least it's something.

Elettrough avatar Nov 01 '17 16:11 Elettrough

What does this return you in Chrome: http://jsfiddle.net/yyp184nb/1/

For some reason, your Chrome browser is picking up the wrong locale on your machine.

ankitrohatgi avatar Nov 01 '17 16:11 ankitrohatgi

Also affects Firefox, I'm on 58.0b15. Explicit choice for decimal dot or comma is really needed

xtotdam avatar Jan 14 '18 09:01 xtotdam

I checked russian locale settings, comma is default for it, so locale should be okay. Nevertheless a switch will be nice:)

xtotdam avatar Jan 14 '18 09:01 xtotdam

I changed the decimal separator from comma to dot in Control Panel (it was comma) but I get commas as a separator too using the standalone version in Windows Seven, language italian. But since the separator is semicolon I can easily change all commas in dots and vice versa.

zoomx avatar Jan 15 '18 12:01 zoomx

Thanks for all the feedback - I'll add an option to switch manually in the next release.

ankitrohatgi avatar Jan 15 '18 20:01 ankitrohatgi

Hi all, has this issue been resolved by now ?

RemDelaporteMathurin avatar Mar 30 '20 09:03 RemDelaporteMathurin

Hi @RemiTheWarrior No, it has not. Trying to export data with comma as a column separator gives me that: изображение And it is impossible to distinguish whether it is X column or already Y. Possibility to export it like

0.739,  0.092
1.305,  -0.128
1.709,  0.262
2.327,  -0.305
3.133,  0.532
3.597,  -0.440
3.875,  0.475
4.224,  -0.333
5.047,  0.837
5.491,  -0.660
5.495,  0.199

would really help.

xtotdam avatar Mar 30 '20 13:03 xtotdam

Browser locale does not affect the data representation, i.e. switching from [ru-ru] to [en-us] did nothing.

I am using Firefox 74.0 64-bit by the way

xtotdam avatar Mar 30 '20 13:03 xtotdam

So... still not possible to chose one over the other, you really end up having to excel your way around the data just to actually extract the useful things. Still tremendously useful and all but it's definitely an essential thing to have the option to select what you need.

squasheds avatar May 17 '20 06:05 squasheds

So still no fix for this issue is available?

pietrodigangi avatar Apr 29 '21 07:04 pietrodigangi

@pietrodigangi no it hasn't I'm afraid

RemDelaporteMathurin avatar Apr 29 '21 08:04 RemDelaporteMathurin

Running the digitizer from https://apps.automeris.io/wpd/ with Firefox (78.10.0esr (64-bit)) in Linux Debian 11 bullseye / branch testing, I typically see decimal points and columns separated by a comma, like the one below:

decimal

And if I wish to alter the column separation, e.g., to deploy a semi-colon instead, this equally works just fine (exchange of the character in the separator window + click on Format):

decimal_semicolon

While not a solution in the Digitizer, you still may adjust the decimal separator within a column with a search-and-replace substitution many text editors offer. The substitution may be scripted using regular expressions, too. In case of Linux, for example, sed -i 's/\./,/g' probe.txt would call sed to search in file probe.txt for any occurrences of the period char to be replaced by the comma. Here, the instruction must escape the period char as \. because the period as such has a special meaning in regular expressions. You may train yourself in regex, e.g., on https://regex101.com/

nbehrnd avatar Apr 29 '21 12:04 nbehrnd