How to use reverse scaling function with error bars?

Clash Royale CLAN TAG#URR8PPP
up vote
8
down vote
favorite
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
add a comment |Â
up vote
8
down vote
favorite
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
add a comment |Â
up vote
8
down vote
favorite
up vote
8
down vote
favorite
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
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
plotting error scaling
edited Sep 21 at 20:36
kglr
163k8188387
163k8188387
asked Sep 21 at 20:00
msuffak
432
432
add a comment |Â
add a comment |Â
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] ]

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
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 doGeometricTransformation[elp[[1]], ReflectionTransform[0, -1]]to get the graphics primitives. Then you need to wrap it withGraphicsand 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 findMapAtandReplaceAlljust convenient in that the options ofelpare retained.
â kglr
Sep 22 at 23:41
add a comment |Â
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] ]

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
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 doGeometricTransformation[elp[[1]], ReflectionTransform[0, -1]]to get the graphics primitives. Then you need to wrap it withGraphicsand 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 findMapAtandReplaceAlljust convenient in that the options ofelpare retained.
â kglr
Sep 22 at 23:41
add a comment |Â
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] ]

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
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 doGeometricTransformation[elp[[1]], ReflectionTransform[0, -1]]to get the graphics primitives. Then you need to wrap it withGraphicsand 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 findMapAtandReplaceAlljust convenient in that the options ofelpare retained.
â kglr
Sep 22 at 23:41
add a comment |Â
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] ]

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
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] ]

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
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 doGeometricTransformation[elp[[1]], ReflectionTransform[0, -1]]to get the graphics primitives. Then you need to wrap it withGraphicsand 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 findMapAtandReplaceAlljust convenient in that the options ofelpare retained.
â kglr
Sep 22 at 23:41
add a comment |Â
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 doGeometricTransformation[elp[[1]], ReflectionTransform[0, -1]]to get the graphics primitives. Then you need to wrap it withGraphicsand 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 findMapAtandReplaceAlljust convenient in that the options ofelpare 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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password