automeris-io / WebPlotDigitizer

Computer vision assisted tool to extract numerical data from plot images.
https://automeris.io
GNU Affero General Public License v3.0
2.67k stars 362 forks source link

Decimal separator - comma - dot #114

Open Elettrough opened 7 years ago

Elettrough commented 7 years ago

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.

ankitrohatgi commented 7 years ago

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.

Elettrough commented 7 years ago

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

ankitrohatgi commented 7 years ago

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!

Elettrough commented 7 years ago

It has a comma.

Elettrough commented 7 years ago

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.

ankitrohatgi commented 7 years ago

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.

xtotdam commented 6 years ago

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

xtotdam commented 6 years ago

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

zoomx commented 6 years ago

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.

ankitrohatgi commented 6 years ago

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

RemDelaporteMathurin commented 4 years ago

Hi all, has this issue been resolved by now ?

xtotdam commented 4 years ago

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 commented 4 years ago

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

squasheds commented 4 years ago

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.

pietrodigangi commented 3 years ago

So still no fix for this issue is available?

RemDelaporteMathurin commented 3 years ago

@pietrodigangi no it hasn't I'm afraid

nbehrnd commented 3 years ago

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/