|
From: S <ste...@gm...> - 2008-04-09 19:53:53
|
Hello, I ran over the following problem: I have input Data which is stored with "," as decimalsign. For the X11-terminal, plotting with set decimalsign locale "de_DE@euro" works, however, if I try to plot into a postscript file, it doesn't. So far I use sed to replace the "," by "." , I would like to solve this from within gnuplot. Any idea, what is going wrong, here? Thanks, Stephan My Minimal script shows the plot of file.txt first in x11 then in postcript, which reveals an empty ps-file. ################script########### set decimalsign "de_DE@euro" set term x11 plot "file.txt" pause -1 set term postscript eps set out "file.ps" replot ############data file ########## file.txt: 1 0,1 2 0,2 3 0,3 4 0,4 5 0,5 |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2008-04-09 22:10:48
|
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? |
|
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?
>
|
|
From: S <ste...@gm...> - 2008-04-17 19:59:31
Attachments:
still_truncated.ps
works_only_in_x11.ps
|
Hello, is there nobody who can help me with my problem? I attach two files to this e-mail, which are output from the script from my last e-mail. They are supposed to show the same graph, just that the second one (works_only_in_x11.ps") doesn't show anything. The x11 replot (_after_ "unset out") shows the correct graph. Does the script from my last e-mail work with anyone elses version of gnuplot with correct output? (mine is Version 4.2 patchlevel 0 last modified March 2007 System: Linux 2.6.22-14-generic from ubuntu repositories) Thanks, Stephan P.S.: again, the minimal script and a sample file.txt for trying out ############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? > |
|
From: Thomas S. <t.s...@fz...> - 2008-04-17 20:39:30
|
> Version 4.2 patchlevel 0 > last modified March 2007 > System: Linux 2.6.22-14-generic >(from ubuntu 7.10 repositories) version 4.2.0 has a problem with set decimalsign locale "de_DE@euro" when producing postscript: it writes some (not all) float values in the postscript code with ',' instead of '.' which confuses the postscript interpreter. version 4.3 cvs doesn't have this problem anymore. (version 4.2.3 has it) -- View this message in context: http://www.nabble.com/decimalsign-and-postscript-output-tp16595314p16754697.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: S <ste...@gm...> - 2008-04-17 22:13:45
|
> version 4.3 cvs doesn't have this problem anymore. > (version 4.2.3 has it) I will have to live with this or switch to 4.3 cvs Thanks for the answer, Thomas. Stephan Thomas Sefzick schrieb: >> Version 4.2 patchlevel 0 >> last modified March 2007 >> System: Linux 2.6.22-14-generic >> (from ubuntu 7.10 repositories) > > version 4.2.0 has a problem with > set decimalsign locale "de_DE@euro" > when producing postscript: it writes some (not all) > float values in the postscript code with ',' instead of '.' > which confuses the postscript interpreter. > > version 4.3 cvs doesn't have this problem anymore. > (version 4.2.3 has it) > |