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 Nov 15 18:58:57 2012  
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 MarkupRich 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 Oct 19 22:26:48 2015, comment #6:

Thanks Avinoam for confirming it works.
Closing report.

Pantxo Diribarne <pantxo>
Project Member
Mon Oct 19 21:01:25 2015, 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 Oct 17 17:14:32 2015, 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 Apr 28 02:53:22 2014, 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 Feb 28 01:48:46 2013, 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 Nov 18 02:22:12 2012, 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 Nov 15 18:58:57 2012, 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 (5kB - 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 Oct 19 22:26:48 2015pantxoOpen/ClosedOpen=>Closed
    Mon Oct 19 21:01:25 2015avinoamAttached File-=>Added foo.svg, #35232
    Sat Oct 17 17:14:32 2015pantxoStatusNone=>Fixed
    Mon Apr 28 02:53:22 2014rik5Priority5 - Normal=>1 - Later
    Thu Feb 28 01:48:46 2013rik5Attached File-=>Added svg_rect_tst.m, #27540

    Back to the top

    Powered by Savane 3.1-cleanup1