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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-21-2007, 11:03 AM
|
#1
|
LQ Newbie
Registered: Aug 2007
Posts: 1
Rep:
|
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
|
|
|
09-19-2007, 11:54 AM
|
#2
|
LQ Newbie
Registered: May 2007
Posts: 2
Rep:
|
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.
|
|
|
01-10-2008, 09:13 PM
|
#3
|
Member
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129
Rep:
|
Thank you so much for this question and the suggestion to run the script twice 
|
|
|
03-22-2008, 03:57 PM
|
#4
|
LQ Newbie
Registered: Mar 2008
Posts: 1
Rep:
|
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
|
|
|
08-26-2008, 09:04 AM
|
#5
|
Member
Registered: Jan 2004
Location: Denmark
Distribution: Fedora Core 6
Posts: 224
Rep:
|
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.
|
|
|
03-11-2009, 11:22 AM
|
#6
|
LQ Newbie
Registered: Feb 2008
Location: Boulder, CO USA
Distribution: Ubuntu and Android
Posts: 10
Rep:
|
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).
|
|
|
03-18-2009, 11:24 AM
|
#7
|
LQ Newbie
Registered: Oct 2005
Posts: 2
Rep:
|
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.
|
All times are GMT -5. The time now is 11:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|