Matlab:如何绘制没有颜色毕业? [英] Matlab: How to plot without color graduation?

查看:211
本文介绍了Matlab:如何绘制没有颜色毕业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友制作了一个脚本来处理大量数据并绘制各种图表,但是当他运行脚本时,图表根据图例有不同的颜色,当我这样做时,所有图表都与颜色毕业相似从黑色到红色!



使用颜色渐变图形绘制2D图: - / p>

  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


解决方案

是一个已知问题与某些英特尔图形驱动程序。一个潜在的解决方法是使用基本的硬件渲染:

  opengl hardwarebasic 

您也可以禁用行对象的 AlignVertexCenters 属性:

  h = findall(gca,'type','line')
set(h,'AlignVertexCenters','off')

最佳解决方案可能是将显卡驱动程序更新为4380版本。


My friend has made a script to handle a lot of data and plot various plots, however when he runs 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?

2D plot with color graduated graphs:-

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

解决方案

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.

这篇关于Matlab:如何绘制没有颜色毕业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆