1
$\begingroup$

I am trying to reverse the x-axis using ScalingFunctions but it's not working. I have a 3D plot with x, y and z scale in increasing order, but I want the x-axis to be in reverse order. How can I go about it?

$\endgroup$
  • 1
    $\begingroup$ What do you mean by "reverse the x axis"? Please provide your code that attempts the solution along with data so people may help. $\endgroup$ – Mark R Feb 8 at 19:49
  • $\begingroup$ Here is my code: ListPlot3D[Vp2aa, PlotRange -> All, ColorFunction -> Function[{Sw, [Phi], Vp2aa}, Hue[Vp2aa]], AxesLabel -> {"[Phi]", "Sw", "Vp2aa"}, PlotLegends -> BarLegend[{Hue, {0, 6000}}]]. My x-axis range from 0 to 100 but I want it to range from 100 to 0 i.e. starting from 100 and not 0 $\endgroup$ – Crown Feb 8 at 20:31
  • $\begingroup$ Do you mean "[Phi]" in places where you write "[Phi]"? It is possible that the backslash was removed - it was removed from my writing this too. I'm also confused as to whether Vp2aa is the z-axis value or the data. If it is just the z-axis, don't you need more to plot? Meaning all values. May we see the data (or subset of the data) you wish to plot? $\endgroup$ – Mark R Feb 8 at 20:36
  • $\begingroup$ Vp2aa = Simplify[ Table[Sqrt[( Kd + ((1 - (Kd/Ko)^2)/([Phi]/Kf + (1 - [Phi])/Ko - Kd/ Ko^2)) + (4/ 3 [G*(1 - ([Phi]/[Phi2]))))/(((1 - [Phi])*[Ko) + (\ [Phi]*Sw*[Rho]w) + ((1 - Sw) [Rho]a))], {Sw, 0, 1, 0.01}, {[Phi], 0, 0.4, 0.01}]]; $\endgroup$ – Crown Feb 8 at 20:42
  • 1
    $\begingroup$ Does adding ScalingFunctions -> {"Reverse", None, None} to options of your ListPlot3D work for you? $\endgroup$ – Alx Feb 9 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.