Changing the histogram edge color from the default green gradient.
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi Guys, I am having problems with the standard histogram function in Matlab 2015b.
The edges are colored with a green gradient and I cannot change it.
Example: x = randn(10000,1); h = histogram(x);
This is the output:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159728/image.png)
According to Documentation (<http://de.mathworks.com/help/matlab/ref/histogram.html>) I should get black edges. h.EdgeColor is [0, 0, 0] by the way and changing has no influence on the appearence.
댓글 수: 3
Duijnhouwer
2016년 6월 4일
편집: Duijnhouwer
2016년 6월 4일
I had the exact same problem on Matlab 8.6.0.267246 (R2015b) running on a Dell Intel core i5-4570S CPU, 64-bit Windows 10. The command "opengl software" solved it (thanks Rick Rosson!). "opengl hardwarebasic" also removed the green gradient and might preserve some hardware acceleration (although on my computer it makes all lines appear a bit fuzzy)
채택된 답변
Rick Rosson
2016년 4월 2일
The problem is with the renderer. Please try the following:
opengl software
and then re-plotting.
댓글 수: 0
추가 답변 (2개)
Image Analyst
2016년 4월 2일
Perhaps increase the edge width:
x = randn(10000,1);
h = histogram(x, 'EdgeColor', 'k', 'LineWidth', 2);
I don't see it so it could be an issue with your video adapter. I think I recall such a thing about 2-3 weeks ago and it was the poster's video adapter. Perhaps changing the renderer might help.
fig = figure;
x = randn(10000,1);
h = histogram(x, 'EdgeColor', 'k', 'LineWidth', 2);
% fig.Renderer = 'opengl';
fig.Renderer = 'painters';
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!