|
From: S <ste...@gm...> - 2008-04-10 21:23:12
|
Hello,
> And what version of gnuplot is that, anyway?
Sorry, I should have mentioned that:
Version 4.2 patchlevel 0
last modified March 2007
System: Linux 2.6.22-14-generic
(from ubuntu 7.10 repositories)
> Why not just
>
> set decimalsign ','
I tried this first, but gnuplot still truncated the values.
If I type
set decimalsign ","
show decimalsign
the output is
decimalsign for input is .
decimalsign for output is ,
so i figured, that the decimalsign change is intended for graphical
output rather than input from files.
set decimalsign locale "de_DE@euro"
show decimalsign
outputs
decimalsign for input is ,
decimalsign for output is ,
which is what I am looking for.
> How does it not work?
A postscript file is produced, its size is similar to the files with
truncated values (in my case ~17k). However, latex, gimp and kghostview
show just an empty page an no diagram.
See my new minimal script and datafile below, it produces three
.ps-files and displays one x11 window.
Without a clue,
Stephan
############script.gp###########
set term postscript eps
#first file: truncated values, since decimalsign ist "." by default
set out "truncated.ps"
plot "file.txt" w lp
#second file: still truncated values, despite "set decimalsign ","
set decimalsign ","
show decimalsign
set out "still_truncated.ps"
replot
#third file and x11: now file is read correctly (see x11 output) but
postscript output is unreadable
set decimalsign locale "de_DE@euro"
show decimalsign
set out "works_only_in_x11.ps"
replot
unset out
set term x11
replot
pause -1
###################################
##################file.txt#########
1 0,5
2 0,5
3 0,2
4 0,4
5 0,5
###################################
Hans-Bernhard Bröker schrieb:
> S wrote:
>
>> I have input Data which is stored with "," as decimalsign. For the
>> X11-terminal, plotting with
>> set decimalsign locale "de_DE@euro"
>
> Why not just
>
> set decimalsign ','
>
> ?
>
>> works, however, if I try to plot into a postscript file, it doesn't.
>
> How does it not work?
>
>> My Minimal script shows the plot of file.txt first in x11 then in
>> postcript, which reveals an empty ps-file.
>
> That the file appears empty is probably unrelated to the decimalsign
> issue. You forgot to close the output file (unset output).
>
> And what version of gnuplot is that, anyway?
>
|