|
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...
|