How to use reverse scaling function with error bars?

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











up vote
8
down vote

favorite
1












I have data which I would like to plot along with the corresponding error bars:



54927.7, -1.91044, 
ErrorBar[38.2664, 0.0538982], 55320.9, -1.97673,
ErrorBar[45.3592, 0.101486], 55671.4, -2.15716,
ErrorBar[41.2234, 0.0258249], 56032.9, -2.15957,
ErrorBar[38.8805, 0.0191277], 56410.6, -2.14289,
ErrorBar[41.5501, 0.0189911], 56787.2, -2.19703,
ErrorBar[38.1972, 0.00632055], 57137.5, -2.1839,
ErrorBar[35.6098, 0.0084108], 57493.3, -2.19994,
ErrorBar[38.0298, 0.00651633], 57859.5, -2.19687,
ErrorBar[40.9682, 0.00658857]


I can use the ErrorListPlot function in mathematica just fine, however if I would like to reverse the y axis scale with the function ScalingFunctions->"Reverse" the error bars do not get plotted along with the data.....any suggestions on how to fix this?










share|improve this question



























    up vote
    8
    down vote

    favorite
    1












    I have data which I would like to plot along with the corresponding error bars:



    54927.7, -1.91044, 
    ErrorBar[38.2664, 0.0538982], 55320.9, -1.97673,
    ErrorBar[45.3592, 0.101486], 55671.4, -2.15716,
    ErrorBar[41.2234, 0.0258249], 56032.9, -2.15957,
    ErrorBar[38.8805, 0.0191277], 56410.6, -2.14289,
    ErrorBar[41.5501, 0.0189911], 56787.2, -2.19703,
    ErrorBar[38.1972, 0.00632055], 57137.5, -2.1839,
    ErrorBar[35.6098, 0.0084108], 57493.3, -2.19994,
    ErrorBar[38.0298, 0.00651633], 57859.5, -2.19687,
    ErrorBar[40.9682, 0.00658857]


    I can use the ErrorListPlot function in mathematica just fine, however if I would like to reverse the y axis scale with the function ScalingFunctions->"Reverse" the error bars do not get plotted along with the data.....any suggestions on how to fix this?










    share|improve this question

























      up vote
      8
      down vote

      favorite
      1









      up vote
      8
      down vote

      favorite
      1






      1





      I have data which I would like to plot along with the corresponding error bars:



      54927.7, -1.91044, 
      ErrorBar[38.2664, 0.0538982], 55320.9, -1.97673,
      ErrorBar[45.3592, 0.101486], 55671.4, -2.15716,
      ErrorBar[41.2234, 0.0258249], 56032.9, -2.15957,
      ErrorBar[38.8805, 0.0191277], 56410.6, -2.14289,
      ErrorBar[41.5501, 0.0189911], 56787.2, -2.19703,
      ErrorBar[38.1972, 0.00632055], 57137.5, -2.1839,
      ErrorBar[35.6098, 0.0084108], 57493.3, -2.19994,
      ErrorBar[38.0298, 0.00651633], 57859.5, -2.19687,
      ErrorBar[40.9682, 0.00658857]


      I can use the ErrorListPlot function in mathematica just fine, however if I would like to reverse the y axis scale with the function ScalingFunctions->"Reverse" the error bars do not get plotted along with the data.....any suggestions on how to fix this?










      share|improve this question















      I have data which I would like to plot along with the corresponding error bars:



      54927.7, -1.91044, 
      ErrorBar[38.2664, 0.0538982], 55320.9, -1.97673,
      ErrorBar[45.3592, 0.101486], 55671.4, -2.15716,
      ErrorBar[41.2234, 0.0258249], 56032.9, -2.15957,
      ErrorBar[38.8805, 0.0191277], 56410.6, -2.14289,
      ErrorBar[41.5501, 0.0189911], 56787.2, -2.19703,
      ErrorBar[38.1972, 0.00632055], 57137.5, -2.1839,
      ErrorBar[35.6098, 0.0084108], 57493.3, -2.19994,
      ErrorBar[38.0298, 0.00651633], 57859.5, -2.19687,
      ErrorBar[40.9682, 0.00658857]


      I can use the ErrorListPlot function in mathematica just fine, however if I would like to reverse the y axis scale with the function ScalingFunctions->"Reverse" the error bars do not get plotted along with the data.....any suggestions on how to fix this?







      plotting error scaling






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 21 at 20:36









      kglr

      163k8188387




      163k8188387










      asked Sep 21 at 20:00









      msuffak

      432




      432




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          7
          down vote



          accepted










          You can post-process the ErrorListPlot output to reverse the vertical axis using ReflectionTransform and modify the ticks:



          elp = ErrorListPlot[data];
          Show[MapAt[GeometricTransformation[#, ReflectionTransform[0, -1]] &, elp, 1],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]


          enter image description here



          Alternatively,



          Show[elp /. p : _Point| _Line :> GeometricTransformation[p, ReflectionTransform[0, -1]],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]



          same picture







          share|improve this answer






















          • This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
            – msuffak
            Sep 22 at 23:32






          • 1




            @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
            – kglr
            Sep 22 at 23:41











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f182324%2fhow-to-use-reverse-scaling-function-with-error-bars%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          7
          down vote



          accepted










          You can post-process the ErrorListPlot output to reverse the vertical axis using ReflectionTransform and modify the ticks:



          elp = ErrorListPlot[data];
          Show[MapAt[GeometricTransformation[#, ReflectionTransform[0, -1]] &, elp, 1],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]


          enter image description here



          Alternatively,



          Show[elp /. p : _Point| _Line :> GeometricTransformation[p, ReflectionTransform[0, -1]],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]



          same picture







          share|improve this answer






















          • This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
            – msuffak
            Sep 22 at 23:32






          • 1




            @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
            – kglr
            Sep 22 at 23:41















          up vote
          7
          down vote



          accepted










          You can post-process the ErrorListPlot output to reverse the vertical axis using ReflectionTransform and modify the ticks:



          elp = ErrorListPlot[data];
          Show[MapAt[GeometricTransformation[#, ReflectionTransform[0, -1]] &, elp, 1],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]


          enter image description here



          Alternatively,



          Show[elp /. p : _Point| _Line :> GeometricTransformation[p, ReflectionTransform[0, -1]],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]



          same picture







          share|improve this answer






















          • This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
            – msuffak
            Sep 22 at 23:32






          • 1




            @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
            – kglr
            Sep 22 at 23:41













          up vote
          7
          down vote



          accepted







          up vote
          7
          down vote



          accepted






          You can post-process the ErrorListPlot output to reverse the vertical axis using ReflectionTransform and modify the ticks:



          elp = ErrorListPlot[data];
          Show[MapAt[GeometricTransformation[#, ReflectionTransform[0, -1]] &, elp, 1],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]


          enter image description here



          Alternatively,



          Show[elp /. p : _Point| _Line :> GeometricTransformation[p, ReflectionTransform[0, -1]],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]



          same picture







          share|improve this answer














          You can post-process the ErrorListPlot output to reverse the vertical axis using ReflectionTransform and modify the ticks:



          elp = ErrorListPlot[data];
          Show[MapAt[GeometricTransformation[#, ReflectionTransform[0, -1]] &, elp, 1],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]


          enter image description here



          Alternatively,



          Show[elp /. p : _Point| _Line :> GeometricTransformation[p, ReflectionTransform[0, -1]],
          PlotRange -> 1.8, 2.3, AxesOrigin -> Automatic, 2.3,
          Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1] ]



          same picture








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 22 at 17:00

























          answered Sep 21 at 20:35









          kglr

          163k8188387




          163k8188387











          • This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
            – msuffak
            Sep 22 at 23:32






          • 1




            @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
            – kglr
            Sep 22 at 23:41

















          • This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
            – msuffak
            Sep 22 at 23:32






          • 1




            @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
            – kglr
            Sep 22 at 23:41
















          This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
          – msuffak
          Sep 22 at 23:32




          This works! Would you be able to explain to me though why the "MapAt" function is needed here and we cannot just use the "GeometricTransformation" function with inputting the ErrorListPlot instead of the "#" ?
          – msuffak
          Sep 22 at 23:32




          1




          1




          @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
          – kglr
          Sep 22 at 23:41





          @msuffak, You can also do GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]] to get the graphics primitives. Then you need to wrap it with Graphics and add the options: Graphics[GeometricTransformation[elp[[1]], ReflectionTransform[0, -1]], AspectRatio -> 1/GoldenRatio, Axes -> True, PlotRange -> All, AxesOrigin -> Automatic, 2.3, Ticks -> Automatic, Charting`FindTicks[0, 1, 0, -1]]. I find MapAt and ReplaceAll just convenient in that the options of elp are retained.
          – kglr
          Sep 22 at 23:41


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182324%2fhow-to-use-reverse-scaling-function-with-error-bars%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)