Could upo please help me to solve my problem?

1 view (last 30 days)
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+');

Accepted Answer

dpb
dpb on 16 Jul 2018
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);

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!