The other drawback to the black background is the shock value when the user first sees the results from my plt utility. To get you started on the Solarized color scheme that I like, use: com. Our eyes never evolved to stare at a bright white light all day, and research shows that looking at bright light before going to bed is bad for sleep. Also this means the colors which are optimized for black backgrounds may no longer be the best choice for the hardcopy. And of course writing a simple cell array of such names is trivially easy and that is all some of those submissions are. If not - what is the order? I was wondering if Tim or others who have studied the complex human color response could confirm or deny this conjecture. In the past, each new plot command would start with the first color blue and you would have to manually change the color.
It offers a warm look that looks great with dark or light backgrounds. In the past, I've monkeyed about with custom color orders I made up on the fly. His code is solid and well implemented, with nice documentation. Ever want to change the default order so that it plots curves with the color order you want instead of the default color order, and without having to specify the color in every single call to plot? The following are the letters you can add to your code to control the color of your plot while plotting in Matlab. Evidently, this does not seem to be documented anywhere. A great thing about this theme is when switching from Dark to Light backgrounds, you don't need to change any of the other colors: They're designed to look good on both backgrounds.
? In the jet colour map, the first plot is blue, followed by the second plot being green. Of course Chad's answer is best. The axes are counted along the top row of the Figure window, then the second row, etc. However, I was excited to see this file, and I know it will come in handy. To change the color order, set a different default value for the ColorOrder property. Starting in R2014b, the hold on command retains the current color so that new plots added to the axes use the next colors in the color order.
See and for more in-depth explanations and fancier coloring, to name just two sources. Paul Mennen replied on : 6 of 7 I find this quite interesting since I have often tried to distinguish many traces on a plot on the bases of color alone. In fact yellow, which is a great choice on a black background generally is awful on the hardcopy because of the white background. But I just thought I'd show people how to change the default color order that you get when you plot lines without specifying the color. There are several ways to do this.
Use Help Subplot subplot Create axes in tiled positions. If it is not documented, you cannot be sure, if it is backward and forward compatible. Often they abandon the utility before getting used to this and appreciating its benefits or realizing that it can easily use the more conventional color schemes. This is why yellow appears last in my sequence shown above. It is also possible to do this manually via the Context Menu, where some of the colors are listed.
I suspect this is because those colors lead to low contrast when plotted against the usual white background. Both are shown in this example. My download was the third. For example, this code displays six lines using the hold on command. I hope this file is a harbinger of more good stuff to come from this author. For example, this code sets the default color order to the colors used in previous releases. Starting in R2014b, the lines cycle through the color order and the resulting plot uses the first six colors of the color order.
However, it is difficult to tell which histogram on the plot is coming from the first set of data and which graphs the second set of data. Hey Matlab users, here's a quick tip that I hope is helpful. I prefer a green text on a dark background, but even a sepia background will be easier on the eyes than Bright White. As an additional bonus, we can create an image that visualizes these colours for you. There is a different colored line for each histogram: one is blue, and the other is green.
One thing I've noticed is that matlab's default color order avoids using some fully saturated colors. In this case the lack of the ink will result white paper, and we get a dark shade if more colors are mixed together. This is discussed in the section below. Ever wonder how it plots blue first, then dark green, then red, then cyan, etc. See below for how to manually adjust the colors. In fact, I've often considered writing something like this myself--but have never gotten around to it. The first row denotes the first colour to go on the plot, followed by the second row denoting the second colour and so on.
Today, I'm going out on a limb: I'm going to Pick a new file from a new File Exchange author. It provides an easy way to generate distinct, differentiable colors in which to plot a long sequence of objects like lines. You can get that information with help plot. For versions after R2014b, this follows the parula colour map, where the first plot would be a lighter blue followed by the second plot being a copper orange of sorts. Search for a color by its name in the list containing more than 2000 names. Or I have a piece-wise graph that I want to have all the same color. For example, I may want some data points drawn in the same color as the curve.