bugGNU Octave - Bugs: bug #47240, Figure background color not...

 
 

bug #47240: Figure background color not printed for OpenGL

Submitted by:  Rik <rik5>
Submitted on:  Tue 23 Feb 2016 10:23:17 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
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 29 Feb 2016 08:21:55 PM UTC, comment #9:

@Martin: this is a known bug that has been fixed (bug #47320).

Pantxo Diribarne <pantxo>
Project Member
Mon 29 Feb 2016 08:20:36 PM UTC, comment #8:

@Martin: You need the development code in order to have the tex interpreter work for labels. The development code is what will eventually become Octave 4.2.

For an immediate workaround in 4.0, use the gnuplot toolkit. Otherwise, you can pull the sources from our Mercurial repository and build a development version. Or you can wait for version 4.2, but we don't have an estimate of when that will be release.d

Rik <rik5>
Project Administrator
Mon 29 Feb 2016 08:05:16 PM UTC, comment #7:

Hey Rik, Hey Pantox

sorry to write here again, but with your code

x = linspace(0,2*pi,360);
figure(1)
plot(sin(x))
set(gca, 'xtick', [0:90:360])
xlabel ('angle / \deg')
print(1,'print.jpg')

I get the following output (pics are attached), seems a similar problem of "print" function, so I wasn't sure if I should open a new bug report.

I mean the label of the x-axis. At the plottet figure, the "\deg" is plottet as "°". Printing this plot with "print" function, won't label the x-axis as "°" but as "\deg".

Using Octave v.4.0.0

(file #36511, file #36512)

Martin <aikon96>
Wed 24 Feb 2016 07:06:53 PM UTC, comment #6:

@Martin: The syntax for the tex interpreter is described in the Octave manual at "15.2.8 Use of the interpreter Property". It doesn't appear to me that you need the '{ ... }' around your expression. The following code works for me where I also removed the explicit setting of interpreter since 'tex' is the default.

Rik <rik5>
Project Administrator
Wed 24 Feb 2016 07:00:51 PM UTC, comment #5:

@Pantxo: Thanks, I was hoping it would be that easy.

I checked in a change that fixes this (http://hg.savannah.gnu.org/hgweb/octave/rev/ae384d86196e). Closing report.

Rik <rik5>
Project Administrator
Wed 24 Feb 2016 03:42:55 PM UTC, comment #4:

@Rik: you need to pass GL2PS_DRAW_BACKGROUND as an option to gl2psBeginPage (I tested it works but don't have time tpo make a patch myself).

@Martin: what you show doesn't seam to have anything to do with this bug, and in fact I can't seam to understand what you expect. Please use aniother bug report and explain what is wrong.

Pantxo Diribarne <pantxo>
Project Member
Wed 24 Feb 2016 10:45:55 AM UTC, comment #3:

Seems there's something more broken, not only the background:

Using this code:
x = linspace(0,2*pi,360);
figure(1)
plot(sin(x))
set(gca, 'xtick', [0:90:360])
xlabel ('{angle / \deg}', "interpreter", "tex")
print(1,'temp.jpg')

At the printed picture (using print command), the "interpreter" for xlabel isn't used.

(file #36450, file #36451)

Martin <aikon96>
Tue 23 Feb 2016 10:45:14 PM UTC, comment #2:

@Pantxo: I added you to the CC list for this bug because you might have some insight. Is there a simple reason why the figure colore would not be printed with OpenGL? Are we passing in the context for only the axes object?

Rik <rik5>
Project Administrator
Tue 23 Feb 2016 10:26:30 PM UTC, comment #1:

A workaround, for the moment, is to switch to gnuplot which does print the background color.

Rik <rik5>
Project Administrator
Tue 23 Feb 2016 10:23:17 PM UTC, original submission:

The background color of the figure object is not included in the output of print when using one of the OpenGL toolkits.

Sample test code:

The file tst.pdf is attached.

Setting the axes color does work because that uses a patch object underlying the other objects of the axes.

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36511:  print.jpg added by aikon96 (39KiB - image/jpeg - Octave_plot = screenshot of figure, print.jpg is result of printing this figure)
file #36512:  Octave_plot.png added by aikon96 (14KiB - image/png - Octave_plot = screenshot of figure, print.jpg is result of printing this figure)
file #36450:  temp.jpg added by aikon96 (42KiB - image/jpeg)
file #36451:  plot.png added by aikon96 (28KiB - image/png)
file #36444:  tst.pdf added by rik5 (3KiB - application/pdf)
file #36445:  tst2.pdf added by rik5 (3KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 29 Feb 2016 08:05:16 PM UTCaikon96Attached File-=>Added print.jpg, #36511
      Attached File-=>Added Octave_plot.png, #36512
    Wed 24 Feb 2016 07:00:51 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 24 Feb 2016 10:45:55 AM UTCaikon96Attached File-=>Added temp.jpg, #36450
      Attached File-=>Added plot.png, #36451
    Tue 23 Feb 2016 10:43:33 PM UTCrik5Carbon-Copy-=>Added pantxo
    Tue 23 Feb 2016 10:23:17 PM UTCrik5Attached File-=>Added tst.pdf, #36444
      Attached File-=>Added tst2.pdf, #36445
      Carbon-Copy-=>Added aikon96
      Carbon-Copy-=>Added mtmiller

    Back to the top


    Powered by Savane 3.1-cleanup1