Reverse ColorFunction or ColorDataListContourPlot-ColorFunctionScaled ColorData FunctionPlotting: DensityPlot produces artifactsParametricPlot - Problem with ColorFunctionDensityPlot: giving the same color to a range of valuesSpecify range and reverse for colordata in contourplotrescaling ColorFunction for ListContourPlotAdding a second color bar to a plotColorFunction in GraphicsColorData input arguments not clear

Copper as an adjective to refer to something made of copper

My large rocket is still flipping over

Why would a military not separate its forces into different branches?

How is trade in services conducted under the WTO in the absence of the Doha conclusion?

Can an Iranian citizen enter the USA on a Dutch passport?

How can I obtain and work with a Platonic dodecahedron?

How long does it take a postcard to get from USA to Germany?

How is Pauli's exclusion principle still valid in these cases?

Why can't argument be forwarded inside lambda without mutable?

How to replace space with '+' symbol in a triangular array?

What detail can Hubble see on Mars?

Why are condenser mics so much more expensive than dynamics?

Can an earth elemental drag a tiny creature underground with Earth Glide?

Can you figure out this language?

Why does blending blueberries, milk, banana and vanilla extract cause the mixture to have a yogurty consistency?

While drilling into kitchen wall, hit a wire - any advice?

Subnumcases as a part of align

How can I finally understand the confusing modal verb "мочь"?

How long did it take Captain Marvel to travel to Earth?

How to speed up large double sums in a table?

Gerrymandering Puzzle - Rig the Election

Emergency stop in plain TeX, pdfTeX, XeTeX and LuaTeX?

What is monoid homomorphism exactly?

Can a player choose to add detail and flavor to their character's spells and abilities?



Reverse ColorFunction or ColorData


ListContourPlot-ColorFunctionScaled ColorData FunctionPlotting: DensityPlot produces artifactsParametricPlot - Problem with ColorFunctionDensityPlot: giving the same color to a range of valuesSpecify range and reverse for colordata in contourplotrescaling ColorFunction for ListContourPlotAdding a second color bar to a plotColorFunction in GraphicsColorData input arguments not clear













3












$begingroup$


please excuse my bad English, I'm not a native speaker.



This should be fairly simple: Is there a simple way to "reverse" ColorFunction or ColorData?



Let me explain what I mean. Let's say, we have the following plot:



Plot[x, x, 1, 10, ColorFunction -> "Rainbow"]


enter image description here



As you can see, the upper part of the plot is colored red, the lower part is colored blue/purple. How do I reverse that? So that the upper part is purple, the lower part red.



Thank you for your help. I appreciate it.




If you're curious why I ask that: I have made this plot showing the number of molecules of three biological substances over time when metabolized by the body.



Image of two plots










share|improve this question









$endgroup$
















    3












    $begingroup$


    please excuse my bad English, I'm not a native speaker.



    This should be fairly simple: Is there a simple way to "reverse" ColorFunction or ColorData?



    Let me explain what I mean. Let's say, we have the following plot:



    Plot[x, x, 1, 10, ColorFunction -> "Rainbow"]


    enter image description here



    As you can see, the upper part of the plot is colored red, the lower part is colored blue/purple. How do I reverse that? So that the upper part is purple, the lower part red.



    Thank you for your help. I appreciate it.




    If you're curious why I ask that: I have made this plot showing the number of molecules of three biological substances over time when metabolized by the body.



    Image of two plots










    share|improve this question









    $endgroup$














      3












      3








      3





      $begingroup$


      please excuse my bad English, I'm not a native speaker.



      This should be fairly simple: Is there a simple way to "reverse" ColorFunction or ColorData?



      Let me explain what I mean. Let's say, we have the following plot:



      Plot[x, x, 1, 10, ColorFunction -> "Rainbow"]


      enter image description here



      As you can see, the upper part of the plot is colored red, the lower part is colored blue/purple. How do I reverse that? So that the upper part is purple, the lower part red.



      Thank you for your help. I appreciate it.




      If you're curious why I ask that: I have made this plot showing the number of molecules of three biological substances over time when metabolized by the body.



      Image of two plots










      share|improve this question









      $endgroup$




      please excuse my bad English, I'm not a native speaker.



      This should be fairly simple: Is there a simple way to "reverse" ColorFunction or ColorData?



      Let me explain what I mean. Let's say, we have the following plot:



      Plot[x, x, 1, 10, ColorFunction -> "Rainbow"]


      enter image description here



      As you can see, the upper part of the plot is colored red, the lower part is colored blue/purple. How do I reverse that? So that the upper part is purple, the lower part red.



      Thank you for your help. I appreciate it.




      If you're curious why I ask that: I have made this plot showing the number of molecules of three biological substances over time when metabolized by the body.



      Image of two plots







      plotting graphics color






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      Marian StiehlerMarian Stiehler

      855




      855




















          3 Answers
          3






          active

          oldest

          votes


















          2












          $begingroup$

          This may be a shorter solution.



          Plot[x, x, 1, 10, ColorFunction -> ColorData["Rainbow", "Reverse"]]


          enter image description here






          share|improve this answer








          New contributor




          L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          $endgroup$




















            2












            $begingroup$

            To reverse the colours you could try 1-# instead of just # in a pure function passed to ColorFunction. To change how the line segments are coloured, include an exponent as follows.



            Manipulate[
            Plot[E^-x, -1.2 x, -2.4 x, x, 0, 5,
            ColorFunction -> (ColorData["Rainbow", (1 - #)^e] &),
            PlotRange -> 0, 5, 0, 1, Frame -> True, ImageSize -> 450,
            FrameLabel -> "Zeit in Minuten", "Anzahl der Wirkstoffmoleküle"],
            e, 1.0, "Exponent", 0, 10, Appearance -> "Labeled"]


            exponential decay






            share|improve this answer









            $endgroup$




















              1












              $begingroup$

              I have found one possible solution… :)



              Plot[x, x, 1, 10, ColorFunction -> Function[x, y, Reverse@ColorData["Rainbow"][y]]]


              Is there a better way?






              share|improve this answer









              $endgroup$













                Your Answer








                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%2f197759%2freverse-colorfunction-or-colordata%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









                2












                $begingroup$

                This may be a shorter solution.



                Plot[x, x, 1, 10, ColorFunction -> ColorData["Rainbow", "Reverse"]]


                enter image description here






                share|improve this answer








                New contributor




                L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                $endgroup$

















                  2












                  $begingroup$

                  This may be a shorter solution.



                  Plot[x, x, 1, 10, ColorFunction -> ColorData["Rainbow", "Reverse"]]


                  enter image description here






                  share|improve this answer








                  New contributor




                  L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  $endgroup$















                    2












                    2








                    2





                    $begingroup$

                    This may be a shorter solution.



                    Plot[x, x, 1, 10, ColorFunction -> ColorData["Rainbow", "Reverse"]]


                    enter image description here






                    share|improve this answer








                    New contributor




                    L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.






                    $endgroup$



                    This may be a shorter solution.



                    Plot[x, x, 1, 10, ColorFunction -> ColorData["Rainbow", "Reverse"]]


                    enter image description here







                    share|improve this answer








                    New contributor




                    L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.









                    share|improve this answer



                    share|improve this answer






                    New contributor




                    L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.









                    answered 3 hours ago









                    L.YuL.Yu

                    886




                    886




                    New contributor




                    L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.





                    New contributor





                    L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.






                    L.Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.





















                        2












                        $begingroup$

                        To reverse the colours you could try 1-# instead of just # in a pure function passed to ColorFunction. To change how the line segments are coloured, include an exponent as follows.



                        Manipulate[
                        Plot[E^-x, -1.2 x, -2.4 x, x, 0, 5,
                        ColorFunction -> (ColorData["Rainbow", (1 - #)^e] &),
                        PlotRange -> 0, 5, 0, 1, Frame -> True, ImageSize -> 450,
                        FrameLabel -> "Zeit in Minuten", "Anzahl der Wirkstoffmoleküle"],
                        e, 1.0, "Exponent", 0, 10, Appearance -> "Labeled"]


                        exponential decay






                        share|improve this answer









                        $endgroup$

















                          2












                          $begingroup$

                          To reverse the colours you could try 1-# instead of just # in a pure function passed to ColorFunction. To change how the line segments are coloured, include an exponent as follows.



                          Manipulate[
                          Plot[E^-x, -1.2 x, -2.4 x, x, 0, 5,
                          ColorFunction -> (ColorData["Rainbow", (1 - #)^e] &),
                          PlotRange -> 0, 5, 0, 1, Frame -> True, ImageSize -> 450,
                          FrameLabel -> "Zeit in Minuten", "Anzahl der Wirkstoffmoleküle"],
                          e, 1.0, "Exponent", 0, 10, Appearance -> "Labeled"]


                          exponential decay






                          share|improve this answer









                          $endgroup$















                            2












                            2








                            2





                            $begingroup$

                            To reverse the colours you could try 1-# instead of just # in a pure function passed to ColorFunction. To change how the line segments are coloured, include an exponent as follows.



                            Manipulate[
                            Plot[E^-x, -1.2 x, -2.4 x, x, 0, 5,
                            ColorFunction -> (ColorData["Rainbow", (1 - #)^e] &),
                            PlotRange -> 0, 5, 0, 1, Frame -> True, ImageSize -> 450,
                            FrameLabel -> "Zeit in Minuten", "Anzahl der Wirkstoffmoleküle"],
                            e, 1.0, "Exponent", 0, 10, Appearance -> "Labeled"]


                            exponential decay






                            share|improve this answer









                            $endgroup$



                            To reverse the colours you could try 1-# instead of just # in a pure function passed to ColorFunction. To change how the line segments are coloured, include an exponent as follows.



                            Manipulate[
                            Plot[E^-x, -1.2 x, -2.4 x, x, 0, 5,
                            ColorFunction -> (ColorData["Rainbow", (1 - #)^e] &),
                            PlotRange -> 0, 5, 0, 1, Frame -> True, ImageSize -> 450,
                            FrameLabel -> "Zeit in Minuten", "Anzahl der Wirkstoffmoleküle"],
                            e, 1.0, "Exponent", 0, 10, Appearance -> "Labeled"]


                            exponential decay







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 2 hours ago









                            KennyColnagoKennyColnago

                            12.3k1754




                            12.3k1754





















                                1












                                $begingroup$

                                I have found one possible solution… :)



                                Plot[x, x, 1, 10, ColorFunction -> Function[x, y, Reverse@ColorData["Rainbow"][y]]]


                                Is there a better way?






                                share|improve this answer









                                $endgroup$

















                                  1












                                  $begingroup$

                                  I have found one possible solution… :)



                                  Plot[x, x, 1, 10, ColorFunction -> Function[x, y, Reverse@ColorData["Rainbow"][y]]]


                                  Is there a better way?






                                  share|improve this answer









                                  $endgroup$















                                    1












                                    1








                                    1





                                    $begingroup$

                                    I have found one possible solution… :)



                                    Plot[x, x, 1, 10, ColorFunction -> Function[x, y, Reverse@ColorData["Rainbow"][y]]]


                                    Is there a better way?






                                    share|improve this answer









                                    $endgroup$



                                    I have found one possible solution… :)



                                    Plot[x, x, 1, 10, ColorFunction -> Function[x, y, Reverse@ColorData["Rainbow"][y]]]


                                    Is there a better way?







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 3 hours ago









                                    Marian StiehlerMarian Stiehler

                                    855




                                    855



























                                        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.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197759%2freverse-colorfunction-or-colordata%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

                                        Log på Navigationsmenu

                                        Creating second map without labels using QGIS?How to lock map labels for inset map in Print Composer?How to Force the Showing of Labels of a Vector File in QGISQGIS Valmiera, Labels only show for part of polygonsRemoving duplicate point labels in QGISLabeling every feature using QGIS?Show labels for point features outside map canvasAbbreviate Road Labels in QGIS only when requiredExporting map from composer in QGIS - text labels have moved in output?How to make sure labels in qgis turn up in layout map?Writing label expression with ArcMap and If then Statement?

                                        Detroit Tigers Spis treści Historia | Skład zespołu | Sukcesy | Członkowie Baseball Hall of Fame | Zastrzeżone numery | Przypisy | Menu nawigacyjneEncyclopedia of Detroit - Detroit TigersTigers Stadium, Detroit, MITigers Timeline 1900sDetroit Tigers Team History & EncyclopediaTigers Timeline 1910s1935 World Series1945 World Series1945 World Series1984 World SeriesComerica Park, Detroit, MI2006 World Series2012 World SeriesDetroit Tigers 40-Man RosterDetroit Tigers Coaching StaffTigers Hall of FamersTigers Retired Numberse