LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 08-21-2007, 11:03 AM   #1
sreejithpk
LQ Newbie
 
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
gnuplot svg terminal problem


within the gnuplot when i created svg file using the svg terminal, the svg file couldnt open using inkscape or other viewer.

example:
gnuplot> set term svg
Terminal type set to 'svg'
Options are 'size 600 480 fixed fname 'Arial' fsize 12 butt '
gnuplot> set out "test.svg"
gnuplot> plot [0:1] x**2
then when i tried to open the test.svg, it is nt working giving me an error
XML Parsing Error: no element found
Location: file:///home/..../test.svg
Line Number 103, Column 1:



But when i made a script using the above commands
----------------------
$emacs scriptfile&
scriptfile contains:
gnuplot> set term svg
Terminal type set to 'svg'
Options are 'size 600 480 fixed fname 'Arial' fsize 12 butt '
gnuplot> set out "test.svg"
gnuplot> plot [0:1] x**2
-------------
and used gnuplot in the following way

...@..:~$ gnuplot scriptfile

it indeed worked and i can open the test.svg.

any explanation of what went wrong in the first case??

gnuplot version:
(G N U P L O T Version 4.2 System: debian sid/lenny Linux 2.6.17-2-686)

Thanks
Sree
 
Old 09-19-2007, 11:54 AM   #2
matei
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
I have had a similar problem with generating SVG graphs witrh GNUPLOT, where in order to generate a correct SVG file, i would have to run the script twice.
 
Old 01-10-2008, 09:13 PM   #3
towsonu2003
Member
 
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129

Rep: Reputation: 15
Thank you so much for this question and the suggestion to run the script twice
 
Old 03-22-2008, 03:57 PM   #4
ejaabr
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
It's easy to understand what's happening: when you set the terminal in gnuplot a file stream is opened with the name you give to the output. This file is closed, and consequently flushed, when you exit gnuplot. If you look at the error given by inkview and seek at the output file for the problem you'll see that the file is lacking of the closing tag </svg> because gnuplot doesn't flush the buffer. You have two alternatives: you can edit the output file and append to the end the missing tag, or you can exit gnuplot and all the open files will be automatically flushed.
[]
EDU
 
Old 08-26-2008, 09:04 AM   #5
Lobais
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Fedora Core 6
Posts: 224

Rep: Reputation: 30
Another way to flush seams to be calling 'set output "blabla"' or some other new output filename.
I still have a problem, that the generated svgs are bugged though. The box is strange and the plot doesn't appear.
 
Old 03-11-2009, 11:22 AM   #6
smithzv
LQ Newbie
 
Registered: Feb 2008
Location: Boulder, CO USA
Distribution: Ubuntu and Android
Posts: 10

Rep: Reputation: 1
Quote:
I still have a problem, that the generated svgs are bugged though. The box is strange and the plot doesn't appear.
Seeing the same thing here (gnuplot 4.2 and inkscape 0.46). It seems that playing around with the opacity of the objects will make them appear (in black and white). They are 100% opaque, but if you select everything, drop to 99 and then back to 100, the plots and axes appear.

This renders perfectly in Firefox (3.0.7).
 
Old 03-18-2009, 11:24 AM   #7
mättu
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 1
unset output

flushes the output and draws the .svg
Thanks for your discussion here which helped me find the answer!
 
1 members found this post helpful.
  


Reply

Tags
emacs, gnuplot, inkscape, linux, svg


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.svg icons bjb_nyj101 Linux - Software 1 05-02-2007 04:26 PM
no x11 terminal in gnuplot 4.0.0 polzbert Linux - Software 1 01-10-2006 04:54 AM
gnuplot cant detect terminal trylinux Linux - Software 3 02-17-2005 04:02 AM
what is svg really? ZaphyR Linux - General 2 01-10-2005 02:09 PM
SVG with firefox devinWhalen Linux - Software 1 04-20-2004 10:52 AM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration