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

 
 

bug #46993: Incorrect rendering of colorbar during print

Submitter:  None
Submitted:  Wed 27 Jan 2016 01:29:01 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Need Info Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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:


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


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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-23 rik5 Open/ClosedOpen Closed
    2016-01-28 pantxo CategoryPlotting Plotting with OpenGL
        StatusNone Need Info
    2016-01-27 None Attached 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.13-4448.
    Corresponding source code