1
$\begingroup$

For the below plot:

m=1
q=5/2
K = Sqrt[4 m/(3 - q)]
ξ = (q - 1)^2/4 K^2
A = Pi/Sqrt[ξ]
Plot3D[1/A (1 + (q - 1) (Sqrt[ξ]) (x t))/(1 + ξ x^2), {x, 0, 20}, {t, 
0, 5000}, PlotLabel -> "q=5/4", BaseStyle -> {FontSize -> 20}, 
AxesLabel -> {Framed["x", FrameStyle -> None, FrameMargins -> 25], 
Framed["t", FrameStyle -> None, FrameMargins -> 25], 
Framed["ρ(x,t)", FrameStyle -> None, FrameMargins -> 25]}, 
LabelStyle -> Directive[16]]

enter image description here

how would it be possible to make the two zeros coincide and show as one so that it looks more clear?

Thank you!

$\endgroup$
4
  • $\begingroup$ Just a thought, you could define your PlotRange to exclude 0 from z axes. Although, there is probably a better solution $\endgroup$ Commented Jun 30, 2016 at 21:17
  • $\begingroup$ @E.Doroskevic Is there a specific way to do that? $\endgroup$
    – Bazinga
    Commented Jun 30, 2016 at 21:37
  • 1
    $\begingroup$ Just define PlotRange -> {{xmin,xmax},{ymin,ymax},{zmin,zmax}}, you can use Automatic as an argument to let Mathematica decide what is min or max. For example, PlotRange -> {Automatic, Automatic , {1,Automatic}}. I think this should do it :s $\endgroup$ Commented Jun 30, 2016 at 21:43
  • $\begingroup$ @E.Doroskevic Well, it indeed did the trick! Thanks! :D $\endgroup$
    – Bazinga
    Commented Jun 30, 2016 at 22:05

1 Answer 1

3
$\begingroup$

Example

Description

This can be achieved using PlotRange -> {{xmin,xmax},{ymin,ymax},{zmin,zmax}}, you can use Automatic as an argument to let Mathematica decide what is min or max. For example, PlotRange -> {Automatic, Automatic , {1,Automatic}}

Code

m = 1;
q = 5/2;
K = Sqrt[4 m/(3 - q)];
\[Xi] = (q - 1)^2/4 K^2;
A = Pi/Sqrt[\[Xi]];

Plot3D[
 1/A (1 + (q - 1) (Sqrt[\[Xi]]) (x t))/(1 + \[Xi] x^2),
 {x, 0, 20}, {t, 0, 5000},
 PlotLabel -> "q=5/4",
 PlotRange -> {Automatic, Automatic, {1, Automatic}},
 BaseStyle -> {FontSize -> 20}, 
 AxesLabel -> {Framed["x", FrameStyle -> None, FrameMargins -> 25], 
   Framed["t", FrameStyle -> None, FrameMargins -> 25], 
   Framed["\[Rho](x,t)", FrameStyle -> None, FrameMargins -> 25]}, 
 LabelStyle -> Directive[16]]

Output

example

Reference

PlotRange

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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