Combine LineStyleOrder and ColorOrder?!?
Show older comments
Can you combine LineStyleOrder and ColorOrder? I am plotting several plots in one subplot with semilogx and I want to change the color AND the LineStyle for every plot. Is that possible or do I have go through the Colors first?
Accepted Answer
More Answers (1)
Geoff Hayes
on 23 Nov 2015
Edited: Geoff Hayes
on 23 Nov 2015
Jan - I don't see any reason why you can't combine the two for (example) the current axes (gca) as
set(gca, 'ColorOrder', myColours, 'LineStyleOrder', myLineStyleOrders);
where myColours and myLineStyleOrders describe the colours and line styles that you wish to display (see axes properties on how to specify the values for each of these properties.
1 Comment
Andre
on 15 Jan 2021
In this case, the line style will only change after an entire cycle of color order is completed.
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
