Different shades of the same colour in one plot

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2














I want to plot several functions in one plot and have different shades of the same colour for each of the plots. Doing with different colours is easy



a1 = Plot[x^2, x, 0, 10, PlotRange -> All, 
PlotStyle -> Thick, Red,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, Green,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, Blue,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
a4 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, Yellow,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
a5 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, Pink,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
Show[a1, a2, a3, a4, a5]


But how can I get 5 different shades of red for example?



I tried to use



r1 = LightRed;
r2 = Red;
r3 = Darker[Red];
a1 = Plot[x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, r1,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, r2,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
PlotStyle -> Thick, r3,
BaseStyle -> 18, FontFamily -> "Times New Roman",
AxesLabel -> "x", "f(X)"];
Show[a1, a2, a3]


which I found in an answer here, but this only gives three choices.










share|improve this question


























    2














    I want to plot several functions in one plot and have different shades of the same colour for each of the plots. Doing with different colours is easy



    a1 = Plot[x^2, x, 0, 10, PlotRange -> All, 
    PlotStyle -> Thick, Red,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, Green,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, Blue,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    a4 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, Yellow,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    a5 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, Pink,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    Show[a1, a2, a3, a4, a5]


    But how can I get 5 different shades of red for example?



    I tried to use



    r1 = LightRed;
    r2 = Red;
    r3 = Darker[Red];
    a1 = Plot[x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, r1,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, r2,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
    PlotStyle -> Thick, r3,
    BaseStyle -> 18, FontFamily -> "Times New Roman",
    AxesLabel -> "x", "f(X)"];
    Show[a1, a2, a3]


    which I found in an answer here, but this only gives three choices.










    share|improve this question
























      2












      2








      2







      I want to plot several functions in one plot and have different shades of the same colour for each of the plots. Doing with different colours is easy



      a1 = Plot[x^2, x, 0, 10, PlotRange -> All, 
      PlotStyle -> Thick, Red,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Green,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Blue,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a4 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Yellow,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a5 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Pink,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      Show[a1, a2, a3, a4, a5]


      But how can I get 5 different shades of red for example?



      I tried to use



      r1 = LightRed;
      r2 = Red;
      r3 = Darker[Red];
      a1 = Plot[x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, r1,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, r2,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, r3,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      Show[a1, a2, a3]


      which I found in an answer here, but this only gives three choices.










      share|improve this question













      I want to plot several functions in one plot and have different shades of the same colour for each of the plots. Doing with different colours is easy



      a1 = Plot[x^2, x, 0, 10, PlotRange -> All, 
      PlotStyle -> Thick, Red,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Green,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Blue,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a4 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Yellow,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a5 = Plot[4 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, Pink,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      Show[a1, a2, a3, a4, a5]


      But how can I get 5 different shades of red for example?



      I tried to use



      r1 = LightRed;
      r2 = Red;
      r3 = Darker[Red];
      a1 = Plot[x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, r1,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a2 = Plot[2 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, r2,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      a3 = Plot[3 x^2, x, 0, 10, PlotRange -> All,
      PlotStyle -> Thick, r3,
      BaseStyle -> 18, FontFamily -> "Times New Roman",
      AxesLabel -> "x", "f(X)"];
      Show[a1, a2, a3]


      which I found in an answer here, but this only gives three choices.







      plotting plot-themes






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 13 at 18:49









      Konstantinos

      8001414




      8001414




















          3 Answers
          3






          active

          oldest

          votes


















          1














          You can Blend Red with White and Black:



          ClearAll[lightToDark]
          lightToDark[n_, c_:Red] := Blend[0, White, n/2, c, n + 3, Black, #] & /@ Range[n]

          Graphics[Table[lightToDark[10][[x]], Disk[x, 0], x, Range[10]]]


          enter image description here



          functions = # x^2 & /@ Range[5];
          Plot[functions, x, 0, 10, PlotRange -> All,
          PlotStyle -> lightToDark[Length@functions],
          BaseStyle -> 18, Thick, FontFamily -> "Times New Roman",
          AxesLabel -> "x", "f(X)", PlotLegends -> "Expressions"]


          enter image description here






          share|improve this answer






























            2














            What about



            col=Table[RGBColor[i, 0, 0], i, 0.5, 1, .1]
            GraphicsRow[Map[Graphics[#, Rectangle] &,col]]


            enter image description here



            or the lighter version



            col = Table[RGBColor[1, i, i], i, 0. , .8, .2]
            GraphicsRow[Map[Graphics[#, Rectangle] &, col]]



            enter image description here






            share|improve this answer






























              1














              How about this..



               color = Take[Darker[Red, #] & /@ Subdivide[30], 1, -10, 5];
              Plot[Evaluate@Table[n x^2, n, 5], x, 0, 10,
              PlotLegends -> "Expressions", PlotRange -> All, PlotStyle -> color,
              BaseStyle -> 18, FontFamily -> "Times New Roman",
              AxesLabel -> "x", "f(x)"]


              enter image description here






              share|improve this answer




















                Your Answer





                StackExchange.ifUsing("editor", function ()
                return StackExchange.using("mathjaxEditing", function ()
                StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
                StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
                );
                );
                , "mathjax-editing");

                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "387"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f187848%2fdifferent-shades-of-the-same-colour-in-one-plot%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                1














                You can Blend Red with White and Black:



                ClearAll[lightToDark]
                lightToDark[n_, c_:Red] := Blend[0, White, n/2, c, n + 3, Black, #] & /@ Range[n]

                Graphics[Table[lightToDark[10][[x]], Disk[x, 0], x, Range[10]]]


                enter image description here



                functions = # x^2 & /@ Range[5];
                Plot[functions, x, 0, 10, PlotRange -> All,
                PlotStyle -> lightToDark[Length@functions],
                BaseStyle -> 18, Thick, FontFamily -> "Times New Roman",
                AxesLabel -> "x", "f(X)", PlotLegends -> "Expressions"]


                enter image description here






                share|improve this answer



























                  1














                  You can Blend Red with White and Black:



                  ClearAll[lightToDark]
                  lightToDark[n_, c_:Red] := Blend[0, White, n/2, c, n + 3, Black, #] & /@ Range[n]

                  Graphics[Table[lightToDark[10][[x]], Disk[x, 0], x, Range[10]]]


                  enter image description here



                  functions = # x^2 & /@ Range[5];
                  Plot[functions, x, 0, 10, PlotRange -> All,
                  PlotStyle -> lightToDark[Length@functions],
                  BaseStyle -> 18, Thick, FontFamily -> "Times New Roman",
                  AxesLabel -> "x", "f(X)", PlotLegends -> "Expressions"]


                  enter image description here






                  share|improve this answer

























                    1












                    1








                    1






                    You can Blend Red with White and Black:



                    ClearAll[lightToDark]
                    lightToDark[n_, c_:Red] := Blend[0, White, n/2, c, n + 3, Black, #] & /@ Range[n]

                    Graphics[Table[lightToDark[10][[x]], Disk[x, 0], x, Range[10]]]


                    enter image description here



                    functions = # x^2 & /@ Range[5];
                    Plot[functions, x, 0, 10, PlotRange -> All,
                    PlotStyle -> lightToDark[Length@functions],
                    BaseStyle -> 18, Thick, FontFamily -> "Times New Roman",
                    AxesLabel -> "x", "f(X)", PlotLegends -> "Expressions"]


                    enter image description here






                    share|improve this answer














                    You can Blend Red with White and Black:



                    ClearAll[lightToDark]
                    lightToDark[n_, c_:Red] := Blend[0, White, n/2, c, n + 3, Black, #] & /@ Range[n]

                    Graphics[Table[lightToDark[10][[x]], Disk[x, 0], x, Range[10]]]


                    enter image description here



                    functions = # x^2 & /@ Range[5];
                    Plot[functions, x, 0, 10, PlotRange -> All,
                    PlotStyle -> lightToDark[Length@functions],
                    BaseStyle -> 18, Thick, FontFamily -> "Times New Roman",
                    AxesLabel -> "x", "f(X)", PlotLegends -> "Expressions"]


                    enter image description here







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 13 at 19:32

























                    answered Dec 13 at 19:13









                    kglr

                    176k9197402




                    176k9197402





















                        2














                        What about



                        col=Table[RGBColor[i, 0, 0], i, 0.5, 1, .1]
                        GraphicsRow[Map[Graphics[#, Rectangle] &,col]]


                        enter image description here



                        or the lighter version



                        col = Table[RGBColor[1, i, i], i, 0. , .8, .2]
                        GraphicsRow[Map[Graphics[#, Rectangle] &, col]]



                        enter image description here






                        share|improve this answer



























                          2














                          What about



                          col=Table[RGBColor[i, 0, 0], i, 0.5, 1, .1]
                          GraphicsRow[Map[Graphics[#, Rectangle] &,col]]


                          enter image description here



                          or the lighter version



                          col = Table[RGBColor[1, i, i], i, 0. , .8, .2]
                          GraphicsRow[Map[Graphics[#, Rectangle] &, col]]



                          enter image description here






                          share|improve this answer

























                            2












                            2








                            2






                            What about



                            col=Table[RGBColor[i, 0, 0], i, 0.5, 1, .1]
                            GraphicsRow[Map[Graphics[#, Rectangle] &,col]]


                            enter image description here



                            or the lighter version



                            col = Table[RGBColor[1, i, i], i, 0. , .8, .2]
                            GraphicsRow[Map[Graphics[#, Rectangle] &, col]]



                            enter image description here






                            share|improve this answer














                            What about



                            col=Table[RGBColor[i, 0, 0], i, 0.5, 1, .1]
                            GraphicsRow[Map[Graphics[#, Rectangle] &,col]]


                            enter image description here



                            or the lighter version



                            col = Table[RGBColor[1, i, i], i, 0. , .8, .2]
                            GraphicsRow[Map[Graphics[#, Rectangle] &, col]]



                            enter image description here







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 13 at 19:23

























                            answered Dec 13 at 19:11









                            Ulrich Neumann

                            6,877515




                            6,877515





















                                1














                                How about this..



                                 color = Take[Darker[Red, #] & /@ Subdivide[30], 1, -10, 5];
                                Plot[Evaluate@Table[n x^2, n, 5], x, 0, 10,
                                PlotLegends -> "Expressions", PlotRange -> All, PlotStyle -> color,
                                BaseStyle -> 18, FontFamily -> "Times New Roman",
                                AxesLabel -> "x", "f(x)"]


                                enter image description here






                                share|improve this answer

























                                  1














                                  How about this..



                                   color = Take[Darker[Red, #] & /@ Subdivide[30], 1, -10, 5];
                                  Plot[Evaluate@Table[n x^2, n, 5], x, 0, 10,
                                  PlotLegends -> "Expressions", PlotRange -> All, PlotStyle -> color,
                                  BaseStyle -> 18, FontFamily -> "Times New Roman",
                                  AxesLabel -> "x", "f(x)"]


                                  enter image description here






                                  share|improve this answer























                                    1












                                    1








                                    1






                                    How about this..



                                     color = Take[Darker[Red, #] & /@ Subdivide[30], 1, -10, 5];
                                    Plot[Evaluate@Table[n x^2, n, 5], x, 0, 10,
                                    PlotLegends -> "Expressions", PlotRange -> All, PlotStyle -> color,
                                    BaseStyle -> 18, FontFamily -> "Times New Roman",
                                    AxesLabel -> "x", "f(x)"]


                                    enter image description here






                                    share|improve this answer












                                    How about this..



                                     color = Take[Darker[Red, #] & /@ Subdivide[30], 1, -10, 5];
                                    Plot[Evaluate@Table[n x^2, n, 5], x, 0, 10,
                                    PlotLegends -> "Expressions", PlotRange -> All, PlotStyle -> color,
                                    BaseStyle -> 18, FontFamily -> "Times New Roman",
                                    AxesLabel -> "x", "f(x)"]


                                    enter image description here







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Dec 13 at 19:08









                                    Okkes Dulgerci

                                    3,9001816




                                    3,9001816



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Mathematica Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        Use MathJax to format equations. MathJax reference.


                                        To learn more, see our tips on writing great answers.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f187848%2fdifferent-shades-of-the-same-colour-in-one-plot%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown






                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Displaying single band from multi-band raster using QGIS

                                        How many registers does an x86_64 CPU actually have?