bugGNU Octave - Bugs: bug #37753, print image-plot to svg not working


bug #37753: print image-plot to svg not working

Submitted by:  Muhali <muhali>
Submitted on:  Thu 15 Nov 2012 06:58:57 PM UTC  
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 1 - LaterItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Mon 19 Oct 2015 10:26:48 PM UTC, comment #6:

Thanks Avinoam for confirming it works.
Closing report.

Pantxo Diribarne <pantxo>
Project Member
Mon 19 Oct 2015 09:01:25 PM UTC, comment #5:

Attached foo.svg, result of

from comment #1, run with MXE-Octave, compiled with gl2ps ver. 1.3.9.
(with ver 1.3.8 it was empty figure file...)

(file #35232)

Avinoam Kalma <avinoam>
Project Member
Sat 17 Oct 2015 05:14:32 PM UTC, comment #4:

gl2ps has been patched and the current development version produces properly scaled images. AFAIU there will be a a release of gl2ps soon [1].

I think we can close this report as it has been fixed upstream

[1] http://www.geuz.org/pipermail/gl2ps/2015/000421.html

Pantxo Diribarne <pantxo>
Project Member
Mon 28 Apr 2014 02:53:22 AM UTC, comment #3:

I've done some more testing and I'm pretty certain this is a problem with gl2ps rather than Octave. Until they do something about this images just aren't going to output well to svg.

Rik <rik5>
Project Administrator
Thu 28 Feb 2013 01:48:46 AM UTC, comment #2:

Alas, I'm not certain this isn't an Octave bug with the printing of 'image' data to svg. I used rectangle() to create 4 differently-colored boxes on an ordinary plot background. When I print this the svg is correct. I'm attaching that file as svg_rect_tst.m

Secondly, the white polygons are present at the beginning of every svg file. They represent the axis background. You can verify this with

Now I get the following in the svg file.

(file #27540)

Rik <rik5>
Project Administrator
Sun 18 Nov 2012 02:22:12 AM UTC, comment #1:

I looked at the content of the svg-file, and found that the four rectangles are being drawn as white.

This appears to be a bug or missing feature in gl2ps. The files where the bug is likely to be found are libinterp/interp-core/gl2ps.c and/or libinterp/interp-core/gl2ps.h. When I have time, I hope to take a look. In the event someeone gets to this before me, the bug is found the change should be made upstream at the link below.


Ben Abbott <bpabbott>
Project Member
Thu 15 Nov 2012 06:58:57 PM UTC, original submission:

produces incorrect output (basically an empty figure).

Muhali <muhali>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #35232:  foo.svg added by avinoam (5KiB - image/svg+xml)
file #27540:  svg_rect_tst.m added by rik5 (268B - text/x-octave)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by avinoam (Updated the item)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 19 Oct 2015 10:26:48 PM UTCpantxoOpen/ClosedOpen=>Closed
    Mon 19 Oct 2015 09:01:25 PM UTCavinoamAttached File-=>Added foo.svg, #35232
    Sat 17 Oct 2015 05:14:32 PM UTCpantxoStatusNone=>Fixed
    Mon 28 Apr 2014 02:53:22 AM UTCrik5Priority5 - Normal=>1 - Later
    Thu 28 Feb 2013 01:48:46 AM UTCrik5Attached File-=>Added svg_rect_tst.m, #27540

    Back to the top

    Powered by Savane 3.1-cleanup1