|
From: Tilman B. <tbe...@ya...> - 2010-04-11 15:32:15
|
Hi, I have some data with numbers which have ' as thousand separators e.g. 12'345.67 3'123.777 1'557.0 How to read this data correctly with gnuplot? I know that this is not a scientific way of displaying numbers for a scientific plotting program... But before changing all the data there might be a way to tell Gnuplot to accept such numbers. I tried: set locale "Italian_Switzerland.1252" because this uses ' as thousand separator and . as decimal point. However, in the above example Gnuplot takes the 12, 3, and 1 and ignores the rest. Any ideas? Thanks, Tilman. |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2010-04-13 18:54:04
|
Tilman Beierlein wrote: > I tried: > set locale "Italian_Switzerland.1252" Close, but no doughnot. You wanted set decimalsign locale "Italian_Switzerland.1252" or something like that instead. And a good dose of luck that your platform actually supports locales like that. |
|
From: Tilman <tbe...@ya...> - 2010-04-13 20:18:34
|
actually, I also tried that one. But no... it still doesn't recognize numbers like 1'234.56 It seems like I have to change all the data... If it was just once that would be ok, but repeatedly, hmmm... Hans-Bernhard Bröker schrieb: > Tilman Beierlein wrote: > >> I tried: >> set locale "Italian_Switzerland.1252" > > Close, but no doughnot. You wanted > > set decimalsign locale "Italian_Switzerland.1252" > > or something like that instead. And a good dose of luck that your > platform actually supports locales like that. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |
|
From: Tatsuro M. <tma...@ya...> - 2010-04-14 08:34:08
|
Hello If you use windows, please use 'sed' for windows from GnuWin32 site http://gnuwin32.sourceforge.net/packages/sed.htm Please use gnuplot.exe(ver 4.4 or later) or wgnuplot_pipes.exe. thousand.txt 12'345.67 3'123.777 1'557.0 gnuplot >plot "< sed -e s/'//g thousand.txt" Do not forget set PATH to the folder in which sed is installed. The unixy commands sed and awk(gwak) are good friends for gnuplot. Regards Tatsuro --- Tilman wrote: > > actually, I also tried that one. > But no... it still doesn't recognize numbers like 1'234.56 > It seems like I have to change all the data... > If it was just once that would be ok, but repeatedly, hmmm... > > Hans-Bernhard Br¾Óker schrieb: > > Tilman Beierlein wrote: > > > >> I tried: > >> set locale "Italian_Switzerland.1252" > > > > Close, but no doughnot. You wanted > > > > set decimalsign locale "Italian_Switzerland.1252" > > > > or something like that instead. And a good dose of luck that your > > platform actually supports locales like that. > > > > ------------------------------------------------------------------------------ > > Download Intel¢î Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > gnuplot-info mailing list > > gnu...@li... > > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > > > > ------------------------------------------------------------------------------ > Download Intel¢î Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -------------------------------------- Get the new Internet Explorer 8 optimized for Yahoo! JAPAN http://pr.mail.yahoo.co.jp/ie8/ |
|
From: Tilman B. <tbe...@ya...> - 2010-04-14 10:07:06
|
Thank you very much, Tatsuro! Works nicely! Tilman. --- Tatsuro MATSUOKA <tma...@ya...> schrieb am Mi, 14.4.2010: > If you use windows, please use 'sed' for windows from > GnuWin32 site > > http://gnuwin32.sourceforge.net/packages/sed.htm > > Please use gnuplot.exe(ver 4.4 or later) or > wgnuplot_pipes.exe. > > thousand.txt > > 12'345.67 > 3'123.777 > 1'557.0 > > gnuplot >plot "< sed -e s/'//g thousand.txt" > > Do not forget set PATH to the folder in which sed is > installed. > > > The unixy commands sed and awk(gwak) are good friends for > gnuplot. > __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com |
|
From: Tai V. <ta...@ea...> - 2010-04-13 21:18:11
|
On 11/04/10 11:31 AM, Tilman Beierlein wrote:
> Hi,
>
> I have some data with numbers which have ' as thousand separators
> e.g.
> 12'345.67
> 3'123.777
> 1'557.0
> How to read this data correctly with gnuplot?
>
> Any ideas?
Tilman,
Summary: cygwin and 'tr'
I encountered a similar problem with , and rather than adjust locale, I
am just filtering that character from the input line (see below).
Whether this works depends on
1) whether your system has pipes and the GNU text tools called 'cat' and
'tr' (as any Unix would)
2) whether your data has legitimate ' (or in my case ,) characters that
are needed. Mine does not.
So instead of plotting 'datafile' directly I now say:
plot "< cat datafile | tr -d ','" \
using 1:4 \
with points ps 0.25
[ Note, for me ',' as above, but for you ''' or perhaps \' ]
I wouldn't want to try this on a Windows box UNLESS the Windows box
already had the Cygwin tools on it, in which case I suspect the above
would work fine. I haven't tested the Windows/Cygwin version though.
Cygwin really makes Windows much less unbearable. Good luck!
Cheers,
tai viinikka
PS: simplifications to eliminate cat or deal with the thicket of " and '
\ are cheerfully accepted.
--
ta...@ea...
|