LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2008, 11:48 AM   #1
hanamilani
Member
 
Registered: Dec 2008
Posts: 66

Rep: Reputation: 0
gnuplot saving


Dear all,

I am using Gnuplot on opensuse 11. I want to save the plot !!!

I have used save/load commands, nothing happened. I tried "help term jpeg/png" none was supported.

Please help me what to do to save the plot, it seems that it only saves the ".dat" file I have and after that I can not again even plot it!!!

What to do to save the plot in "ps" format. Please let me have it in details, I am very illiterate in it !!!

Regards,
Hana
 
Old 12-17-2008, 02:59 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Here's an example snippet:
Code:
set terminal postscript eps colour
plot [-pi:pi] sin(x)
 
Old 12-17-2008, 11:54 PM   #3
hanamilani
Member
 
Registered: Dec 2008
Posts: 66

Original Poster
Rep: Reputation: 0
Gnuplot saving

Hi all,

Thanks for the answer. But I have done that before and I got some digits in the terminal and no plot!!! what should I do next?

Regards,
Hana
 
Old 12-18-2008, 10:51 AM   #4
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 735

Rep: Reputation: 76
Hi.

This script opens a window on my display with the plot:
Code:
#!/bin/bash -

# @(#) s5       Demonstrate gnuplot to postscript.

echo
echo "(Versions displayed with local utility \"version\")"
version >/dev/null 2>&1 && version "=o" $(_eat $0 $1) gs gnuplot
set -o nounset

echo
echo " Results:"

cat > t1 <<EOF
set terminal postscript eps colour
plot [-pi:pi] sin(x)
EOF

echo
echo " gnuplot commands:"
cat t1

gnuplot <t1 >t2

echo
n=$( wc -l < t2 )
echo " First 10 lines of $n in t2:"
head -10 t2

echo
echo " Expect display of postscript file:"
# evince t2
gs t2

exit 0
Producing:
Code:
% ./s5

(Versions displayed with local utility "version")
Linux 2.6.11-x1
GNU bash 2.05b.0
7.07.1
gnuplot 4.0 patchlevel 0

 Results:

 gnuplot commands:
set terminal postscript eps colour
plot [-pi:pi] sin(x)

 First 10 lines of 566 in t2:
%!PS-Adobe-2.0 EPSF-2.0
%%Creator: gnuplot 4.0 patchlevel 0
%%CreationDate: Thu Dec 18 10:42:47 2008
%%DocumentFonts: (atend)
%%BoundingBox: 50 50 410 302
%%Orientation: Portrait
%%EndComments
/gnudict 256 dict def
gnudict begin
/Color true def

 Expect display of postscript file:
ESP Ghostscript 7.07 (2003-07-12)
Copyright 2003 artofcode LLC and Easy Software Products, all rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for
 details.
Loading ( ... messages deleted for demo )
>>showpage, press <return> to continue<<
You need a viewer. This uses gs, but evince also worked.

I got most of my information from info gnuplot (for text), and http://www.gnuplot.info/ (for graphics). Perhaps they are worth a read ... cheers, makyo
 
Old 12-19-2008, 01:04 AM   #5
hanamilani
Member
 
Registered: Dec 2008
Posts: 66

Original Poster
Rep: Reputation: 0
Gnuplot saving

Dear Makayo,

Thanks for helping me.

I have evince and also I have downloaded octave.

But the trouble is that the postscript terminal does not shift to visualization tool.

I have read many times "gnuplotinfo and also rest of the examples. but I have:

gnuplot> plot 'e2.dat'w l

the results is:

6 -3 V
6 -3 V
7 -4 V
6 -3 V
6 -3 V
6 -3 V
7 -2 V
6 -3 V
6 -2 V
6 -1 V
6 -2 V
7 -2 V
6 -2 V
6 -2 V
6 -2 V
7 -2 V
6 -3 V
6 -2 V
stroke
LTb
826 4872 N
826 280 L
6220 0 V
0 4592 V
-6220 0 V
Z stroke
1.000 UP
1.000 UL
LTb
stroke
grestore
end
showpage


Please let me know what to do?!?!?!

Regards,
Hana
 
Old 12-19-2008, 09:23 AM   #6
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 735

Rep: Reputation: 76
Hi.

Did you copy and run the sample script I posted? ... cheers, makyo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gnuplot 4.0.0 ines Linux - Software 1 04-28-2005 02:26 PM
Gnuplot allycavs Linux - Software 5 02-04-2005 07:31 AM
need help for gnuplot eph Linux - Newbie 1 08-23-2004 08:41 AM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 07:27 AM
about gnuplot Rex_chaos Linux - Software 0 09-25-2003 08:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration