Linestyle does not change

Hi, am having a trboule with plot and linestyle commands.
Am using the following code
plot(t,r2,'--b');hold on
plot(t,r3,'-.r'); hold on
plot(t,r1,':g'); hold off
But still am having the same linestyle on all curves (--)?
I have tried several ways to go around this problem, but with no luck at all
Thanks

5 件のコメント

Walter Roberson
Walter Roberson 2016 年 8 月 1 日
Which release are you using, and which operating system? Could you show us
get(gcf, 'renderer')
opengl info
Image Analyst
Image Analyst 2016 年 8 月 2 日
It works fine for me, though the green line especially, and all the lines that I have are a lot more faint and thinner than yours.
ALZ
ALZ 2016 年 8 月 2 日
am using R2015a on windows7 - 64bit
opengl
Version: '3.1.0 - Build 8.15.10.2476'
Vendor: 'Intel'
Renderer: 'Intel(R) HD Graphics Family'
MaxTextureSize: 8192
Visual: 'Visual 0x08, (RGBA 32 bits (8 8 8 8), Z depth...'
Software: 'false'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {116x1 cell}
MaxFrameBufferSize: 4096
Image Analyst
Image Analyst 2016 年 8 月 2 日
Are you sure your r are all 1-D vectors and not 2-D matrices?
ALZ
ALZ 2016 年 8 月 2 日
Well, in fact Rs as well as Ts are all one column vector of different lengths

サインインしてコメントする。

回答 (3 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 1 日

0 投票

Increase the line width
t=0:0.1:10
r1=sin(t)
r2=2*cos(t)
r3=t
plot(t,r2,'--b');hold on
plot(t,r3,'-.r','linewidth',3); hold on
plot(t,r1,':g','linewidth',3);
ALZ
ALZ 2016 年 8 月 2 日

0 投票

It seems the linewidth command partially solves the problem, Thank you Azzi, but increasing the linewidth is not an option, this way am going to miss some information.
ALZ
ALZ 2016 年 8 月 2 日
編集済み: ALZ 2016 年 8 月 2 日

0 投票

Thanks for everyone, it is a rendering problem, if anyone is interested, the problem should be solved by setting the renderer;
figure(1)
plot(t,r2,'--b');hold on
plot(t,r3,'-.r'); hold on
plot(t,r1,':g');
set(figure(1),'Renderer','painters')

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

質問済み:

ALZ
2016 年 8 月 1 日

編集済み:

ALZ
2016 年 8 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by