bugGNU Octave - Bugs: bug #46993, Incorrect rendering of colorbar...

 
 

bug #46993: Incorrect rendering of colorbar during print

Submitted by:  None
Submitted on:  Wed 27 Jan 2016 01:29:01 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Need InfoAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 23 Feb 2016 10:54:44 PM UTC, comment #4:

No response. Assuming workaround is sufficient or that upgrade to newest version of gl2ps solves problem.

Rik <rik5>
Project Administrator
Wed 03 Feb 2016 01:53:51 PM UTC, comment #3:

I still can't test your example as I don't have the data :-). Anyway if the colorbar problem is solved by removing the background plane then it is most probably due to the bug I mentioned. You now have a workaround until your distro adopts the last version of gl2ps.

For the second bug (mixed color/gray in eps files) could you try to switch to fltk? It could be a timing issue when redrawing the figure prior to printing.

Pantxo Diribarne <pantxo>
Project Member
Wed 03 Feb 2016 01:02:44 PM UTC, comment #2:

Here is the code snippet of interest:

c = colormap('jet');
for i = 1:length(nError)
index = ceil(nError(i)*64);
C(i,:) = c(index,:);
end

scatter3(dynamicData(:,2),dynamicData(:,3),dynamicData(:,4),12,C)
hc = colorbar();
labels = (maxError-minError).*[0:5]./5+minError,2;
for i = 1:numel(labels)
strs(1,i) = {sprintf("%5.2f", labels(i))};
end
set(hc,'yTickLabel',strs)
set(hc,'Title','Error [mm]')
print(hf1,'Figure1.png')

Interestingly, I have tried again with different data (different range for the errorbar) and it performed as expected.

I also tried:

set (hc, "color", "none")

This also seems to solve the problem.

Anonymous
Thu 28 Jan 2016 09:21:24 AM UTC, comment #1:

Hi,

Can you provide a sample script that demonstrate the bug? I can't confirm with a simple "sombrero; colorbar".
The partly missing colorbar may be due to a bug in gl2ps that has been solved in the most recent release (1.3.9) and that can be worked around by hiding the background plane of the colorbar:

Now about mixed color/gray in the eps file I don't understand: the whole figure should be in gray scale as by default the terminal for .eps extensions is "-deps" not "-depsc".
I see in the snapshot you are using "qt" graphics_toolkit, can you test with fltk : "close all; graphics_toolkit ("fltk"); ..."

Pantxo Diribarne <pantxo>
Project Member
Wed 27 Jan 2016 01:29:01 PM UTC, original submission:

When trying to save a figure to file, I get some strange behaviour, some of the colours disappear in the rendered image. The figure on-screen remains the same and appears as expected.
Here's the command:

print(hf,'DynamicError.png');
or
print(hf,'DynamicError.pdf');

same behaviour

print(hf,'DynamicError.eps');

results in yet another output with a grayscale colorbar.
images attached

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36176:  figure.png added by None (78KiB - image/png)
file #36177:  DynamicError.pdf added by None (179KiB - application/pdf)
file #36178:  DynamicError.png added by None (299KiB - image/png)
file #36179:  DynamicError.eps added by None (655KiB - image/x-eps)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by None (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 23 Feb 2016 10:54:44 PM UTCrik5Open/ClosedOpen=>Closed
    Thu 28 Jan 2016 09:21:24 AM UTCpantxoCategoryPlotting=>Plotting with OpenGL
      StatusNone=>Need Info
    Wed 27 Jan 2016 01:29:01 PM UTCNoneAttached File-=>Added figure.png, #36176
      Attached File-=>Added DynamicError.pdf, #36177
      Attached File-=>Added DynamicError.png, #36178
      Attached File-=>Added DynamicError.eps, #36179

    Back to the top


    Powered by Savane 3.1-cleanup1