Message Boards Message Boards

0
|
1339 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Reversing the X-axis in a ListLogLinearPlot?

Posted 1 year ago

So its possible to reverse the x-axis on a ListPlot using

ScalingFunctions -> {"Reverse", Identity}

However, ListLogLinearPlot does not accept this command. Im wondering if there is an ad-hoc way of forcing it to reverse the axis. In the attached image, i want to reverse the right hand panel so the x-axis "omega*tau" is large near the origin and small on the right side.

Attachments:
POSTED BY: Man Nguyen
4 Replies
Posted 1 year ago

I should note that for whatever reason

ScalingFunctions -> {"Reverse", Identity}

appears as Red for me, even though it seems to be a valid option in the mathematica documentation. Currently have Mathematica 13.0.0 on Mac

POSTED BY: Man Nguyen
Posted 1 year ago

Answered by Vitaliy Kaurov here https://community.wolfram.com/groups/-/m/t/1287170

data=Transpose[Table[Sort[RandomReal[{1,1000},100]],2]];
ListPlot[data,
    PlotTheme->"Detailed",
    ScalingFunctions->{
       {-Log[#]&,InverseFunction[-Log[#]&]},
       Automatic}]

generates a log scaled reverse x axis

you can close this thread

POSTED BY: Man Nguyen

Looks normal on my Windows 11 Mathematica V14

enter image description here

POSTED BY: Ahmed Elbanna
Posted 1 year ago

Doesnt work for ListLogLinearPlot when the scaling function is set to "reverse". It works for Listplot with an explicit log scale scaling function. This solution works great so it doesnt matter that it seems bugged for ListLogLinear plot.

POSTED BY: Man Nguyen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract