help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with printed figures


From: Ben Abbott
Subject: Re: Problems with printed figures
Date: Sat, 07 Dec 2013 09:01:28 -0500

On Dec 7, 2013, at 12:03 AM, Terry Duell <address@hidden> wrote:

> Hello Ben,
> 
> On Sat, 07 Dec 2013 12:38:30 +1100, Benjamin Abbott <address@hidden> wrote:
> 
> [snip]
> 
>>> 
>>> Just testing this a bit further, I have run Ron's gnuplot script to 
>>> generate an svg, and that svg loads into my LO Writer correctly (using 
>>> "insert > picture > from file" ) but is incorrectly rendered by LO Draw.
>>> I have "gnuplot-4.6.1-6.fc19.x86_64" and "octave-3.6.4-3.fc19.x86_64"
>>> I would have guessed that Octave would use this gnuplot to generate the svg 
>>> file, but clearly the svg generated by Octave is different to that 
>>> generated directly by gnuplot.
>>> Can anyone elaborate on what might be happening here?
>> 
>> Octave uses gnuplot to generate an eps file and then uses pstoedit, epstool, 
>> transfig, or Ghostscript to convert to other formats.
> 
> OK.
> I have just looked at having Octave generate eps, then run those eps files 
> through a script that runs 'pstoedit -f plot-svg in.eps out.svg'.
> That does the conversion OK, and is probably usable with a few tweaks.
> The eps out of Octave has 'BoundingBox: 50 50 626 482' and the svg from the 
> pstoedit conversion seems to OK in what I can see, but is displaced to the 
> right and down, such that part of the plot is cut off. See attached 
> screenshot.
> I think I need to force the eps to move the plot within the boundingbox, or 
> force the pstoedit to place the svg differently within the 'paper' boundaries.
> I'm guessing a bit here, new territory. Is there a reasonable way around this?
> 
> Cheers,
> -- 
> Regards,
> Terry Duell<Screenshot.jpg>

My guess is that the large bounding box is due to the conversion to svg.  Since 
svg-files are ascii XML files, you can open the svg-file in an editor, locate 
for the bbox definition, and modify it.

You're looking for something like what is below.  The "viewBox defines the 
bbox.  You'll likely have to change the "width" and "height" as well.

<svg width="793" height="595" viewBox="0 0 793 595"
 xmlns="http://www.w3.org/2000/svg";
 xmlns:xlink="http://www.w3.org/1999/xlink";>

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]