Could upo please help me to solve my problem?

1 次查看(过去 30 天)
I am trying to plot a graph with many data, I want to plot each set with a different color and marker. When I use the 8 predefined colors no problem is registered
p = loglog(Q,T,'black.',Q,curve_t,'red-',qbf,tbf,'black+').
The problem comes when I want to define a different color
p = loglog(Q,T,'black.',Q,curve_t,'-','color',[0.75 0.75 0.75],qbf,tbf,'black+');

采纳的回答

dpb
dpb 2018-7-16
The latter is unsupported syntax; named parameter/value pairs can only trail all the given x,y,linespec triplets and that particular parameter will apply to all lines. To do what you're trying you'll either have to add lines individually or fix up the desired line color after creating the overall plot...
hL=loglog(Q,T,'k.',Q,curve_t,'-',qbf,tbf,'+k');
hL(2).Color=0.75*ones(1,3);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by