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.
|
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"); ..."
|
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
|