How to plot without color graduation?

2 ビュー (過去 30 日間)
Mads Svendsen
Mads Svendsen 2016 年 8 月 8 日
回答済み: Mads Svendsen 2016 年 8 月 13 日
Hi everyone,
Hope you can help me and my group, as we have been struggling with this matter for some days now. My friend have made a script to handle a lot of data and plot various plots, however when he run the script the graphs have different colors according to the legend and when I do it, all graphs are similar with a color graduation from black to red! (see picture) Why does it differ and how do I get the graphs in different colors?
figure
hold on
plot(sentar_7.created_at, sentar_7.acc_diff, '-');
plot(sentar_7.created_at, sentar_7.stand_toggle, '-');
plot(sentar_7.created_at, sentar_7.state, '-');
title('Sentar 7 acc')
xlabel('tid')
ylabel('dist [cm]')
legend('acc diff','stand toggle', 'state')
hold off
Regards Mads R. Svendsen

回答 (1 件)

Mads Svendsen
Mads Svendsen 2016 年 8 月 13 日
In case someone else should experience the same issues, I got the following answer on StackOverflow, which solved the problem.
This is a known issue with certain Intel graphics drivers. One potential workaround is to use basic hardware rendering:
opengl hardwarebasic
You could also disable the AlignVertexCenters property of the
line object:
h = findall(gca, 'type', 'line')
set(h, 'AlignVertexCenters', 'off')
The best solution may be to update your graphics drivers to the 4380 version.

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by