plot efficient frontiers with different colors
4 views (last 30 days)
Show older comments
Hi, I'm following the Mathworks video "Getting started with Portfolio Optimization" and I realized that I can't plot my efficient frontiers with different colors: I mean, each time I add a constraint or compute asset Moments at different conditions, it plots several frontiers with the same color(blue). I've seen on the line 77 of tutorial a script: "format_plots()" but everytime I use it doesn't work. Can u help me understand how to fix several colors? thanks
2 Comments
Adam
on 21 May 2015
Edited: Adam
on 22 May 2015
You need to give more information, in particular which version of Matlab you are using and which version of Matlab the tutorial is using.
Most of us haven't watched that tutorial so giving enough detail here for your question to be self-sufficient would be helpful to get answers as most of us don't have time to watch a random tutorial just to answer what may be a simple question.
In general you can simply specify the colour you want to plot a graph with as e.g.
plot( x, 'Color', [0.5 0.5 1] )
If you are using a post R2014b version of Matlab then successive plots will automatically be given a new colour, but in earlier versions they will not.
Answers (0)
See Also
Categories
Find more on Portfolio Optimization and Asset Allocation 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!