![]() Given an initial large list of possible colors, it iteratively chooses the entry in the list that is farthest (in Lab space) from all previously-chosen entries.įor example, when 25 colors are requested: This function generates a set of colors which are distinguishable by reference to the "Lab" color space, which more closely matches human color perception than RGB. It is best described in the author's own words: ![]() For 10 plots, you obviously cannot rely on the default ColorOrder.Ī great way to define N visually distinct colors is with the "Generate Maximally Perceptually-Distinct Colors" (GMPDC) submission on the MATLAB Central File File Exchange. However, by default MATLAB only specifies a short list of colors ( just 7 as of R2013b) to cycle through, and on the other hand it can be problematic to find a good set of colors for more data series. ![]() ![]() The ColorOrder axes property allows MATLAB to automatically cycle through a list of colors when using hold on/all (again, see Appendix below for how to set/ get the ColorOrder for a specific axis or globally via DefaultAxesColorOrder). There is a great tool on the MATLAB Central File Exchange to generate any number of visually distinct colors, if you have the Image Processing Toolbox to use it.For information on how to change the 'ColorOrder' property and how to set a global default with 'DefaultAxesColorOrder', see the "Appendix" at the bottom of this post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |