My objective is to use Plot
with an arbitrary Color Scheme
to get something like this
but I want to use any color scheme such as:
- a build-in scheme such as
Rainbow
- or customize once such as
.
BarLegend[{{Darker@Red, Red, Lighter@Gray, Blue, Darker@Blue}, {1,
11}}, ColorFunctionScaling -> True]
Here is my try:
dats = Table[n Sin[ x], {n, 1, 11}];
plot = Plot[dats, {x, -\[Pi], \[Pi]},
ColorFunction -> ColorData["Rainbow"], Frame -> True,
ImagePadding -> 50, PlotRangeClipping -> False]
Note that it is not working as desired, each plot should have the same color but it is coloring according to the y-axis.
For the customized color scheme mentioned above cant do it, any help, please?