0
$\begingroup$

I would like to create a plot in Mathematica similar to

example plot

for the equation $\frac{d P}{dt}=P(0.6-0.003P).$

My attempt so far is

StreamPlot[{1, P (0.6 - 0.003 P)}, {t, 0, 30}, {P, 0, 220}, 
 PlotRangePadding -> Automatic, StreamPoints -> {Automatic, 0.1}, 
 StreamScale -> None, StreamStyle -> {Thick, Dashed}, 
 ImageSize -> Medium, PlotRange -> {{0, 30}, {0, 220}}, Axes -> True, 
 AxesLabel -> {"t", "P(t)"}]

best so far

My questions are

  • Why don't the Axes labels appear on the image?
  • How can I increase the density of the stream points?
  • Can I increase the thickness of the lines?
  • How can I change the colour of the lines to black?
  • Some stream points appear and disappear how can I get rid of these odd looking points?
$\endgroup$
2
  • 1
    $\begingroup$ Use StreamStyle -> {Thickness[0.01], Black, Dashed}; and FrameLabel instead of AxesLabel. $\endgroup$
    – corey979
    Commented Jan 9, 2018 at 19:04
  • $\begingroup$ Do you know how I can increase the density of stream points? $\endgroup$
    – AzJ
    Commented Jan 9, 2018 at 19:24

1 Answer 1

2
$\begingroup$

Given your example graphic, I think you want VectorPlot rather than StreamPlot. Use VectorStyle -> Arrowheads[0] to eliminate the arrowheads, if that's what you want.

VectorPlot[{1, P (0.6 - 0.003 P)}, {t, 0, 30}, {P, 0, 220}, 
     PlotRange -> {{0, 30}, {0, 220}}, Axes -> True, 
     FrameLabel -> {"t", "P(t)"}, 
     VectorStyle -> {Thick, Black, Arrowheads[0]}]

enter image description here

$\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.