I have plotted $y$ and $R_0(s_\infty-1)$, for different values $R_0$. How do I flip the x-axis so it doesn't look messy?

My attempt:

Plot[{Log[ x], 1*(x - 1), 1.5*(x - 1), 2*(x - 1), 2.5*(x - 1), 
  3*(x - 1)}, {x, 0, 1}, ImageSize -> 500, 
 PlotStyle -> {{Blue, Dashing[None]}, {Red, Dashing[None]}, {Black, 
    Dashing[None]}, {Black, Dashing[None]}, {Black, 
    Dashing[None]}, {Black, Dashing[None]}}, Axes -> False, 
 Frame -> {{True, False}, {False, True}}, 
 FrameLabel -> {{"y", None}, {None, "Fraction susceptible"}}, 
 FrameTicks -> All]

We should get this:

enter image description here

  • 1
    $\begingroup$ What did you try so far? Please provide your code! Perhaps Solve[Log[S\[Infinity]] == R0 (S\[Infinity] \[Minus] 1), S\[Infinity] ] might be a good staring point. $\endgroup$ Jun 7, 2021 at 14:13
  • $\begingroup$ I tried that, but how do I plot the solution given? $\endgroup$
    – Math
    Jun 7, 2021 at 14:24
  • 1
    $\begingroup$ Please post the Mathematica code,not the TeX. $\endgroup$
    – cvgmt
    Jun 7, 2021 at 22:22
  • $\begingroup$ @cvgmt I was showing all details else I get accused of not posting all the details.. $\endgroup$
    – Math
    Jun 9, 2021 at 11:43
  • $\begingroup$ Hi Math, it looks like you have only posted TeX code for the equations of this question. Can you, please, post your wolfram language code that you have been using to try to solve this question? Then it can be reopened, as it currently lacks such necessary information. $\endgroup$ Jun 9, 2021 at 12:45

1 Answer 1


modified(!question changed!)


eq=Log[S\[Infinity]S0] - R0  (S\[Infinity]S0 S0n - 1) == 0

now depends on two parameters R0,S0n=S0/n and is solved for S\[Infinity]S0=S\[Infinity]/S0

sol=Solve[eq,S\[Infinity]S0 ][[1]]
(*{S\[Infinity]S0 -> -(ProductLog[-E^-R0 R0 S0n]/(R0 S0n))}*)

Plot3D[S\[Infinity]S0 /. sol , {S0n, 0, 2}, {R0, 0, 3},MeshFunctions -> {#3 &},AxesLabel -> {"\!\(\*FractionBox[\(S0\), \(n\)]\)", "R0","\!\(\*FractionBox[\(S\[Infinity]\), \(S0\)]\)"}]

enter image description here

  • $\begingroup$ I made an error in the question. Shall I delete this and post a new one or edit it this one? $\endgroup$
    – Math
    Jun 7, 2021 at 14:56
  • $\begingroup$ @Math it is usually better to edit the question, in most cases. $\endgroup$ Jun 9, 2021 at 12:44
  • $\begingroup$ @Ulrich Neumann : cant you solve for $y$ as per the question and plot $y$ against $S/N$? $\endgroup$
    – Math
    Jun 9, 2021 at 13:27
  • $\begingroup$ @Math What is the definition of S? Probably S\[Infinity]. Your equation depends on three parameters S0,N,R0, though you would need a 4D-Plot!. In my answer I showed a way to visualize S\[Infinity]/S0=f[R0,S0/N] $\endgroup$ Jun 10, 2021 at 6:13
  • $\begingroup$ @UlrichNeumann : Definition of $S$ is number of susceptible at time $t$. I will amend/edit the question again, sorry. We should get the second graph in the question. Let R0 be inputs made by us physically. What I mean is draw the graph of log($s_\infty$) and the graph of $R_0(s_\infty -1)$ for different inputs of $R_0$( like $R_0=1, R_0=1.5, R_0=2, R_0=2.5 R_0=3)$. to put things easy, I want you to replicate the second graph after I edit the question. $\endgroup$
    – Math
    Jun 10, 2021 at 11:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.