Jump to content
Wikipedia The Free Encyclopedia

File:Predator prey dynamics.svg

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Original file (SVG file, nominally 466 ×ばつ 451 pixels, file size: 47 KB)
This is a file from the Wikimedia Commons. Information from its description page there is shown below.
Commons is a freely licensed media file repository. You can help.

Summary

DescriptionPredator prey dynamics.svg
English: The Phase plot for Lotka-Volterra model for predator-prey dynamics for varying initial populations of the predator. The parameters are:

alpha = 1.1 # prey growth rate
beta = 0.4 # prey death rate
gamma = 0.4 # predator death rate
delta = 0.1 # predator growth rate

x0 = 10 # initial prey population
Date
Source Own work
Author Krishnavedala
SVG development
InfoField
The SVG code is valid .
This plot was created with Matplotlib.
Source code
InfoField

Python code

Source code
importnumpyasnp
importmatplotlib.pyplotasplt
alpha = 1.1 # prey growth rate 
beta = 0.4 # prey death rate 
gamma = 0.4 # predator death rate 
delta = 0.1 # predator growth rate 
x0 = 10 # initial prey population
y0s = [1, 2, 5, 7, 10, 12, 15] # initial predator population
fig, ax = plt.subplots(figsize=(6,6))
for y0 in y0s: 
 dt = 1e-3
 T_MAX = 20
 t = np.arange(0,T_MAX,dt)
 x = np.zeros_like(t, dtype=np.float)
 y = np.zeros_like(t, dtype=np.float)
 x[0], y[0] = x0, y0
 for i, tt in enumerate(t):
 if i == 0:
 continue
 x[i] = x[i-1] + (alpha * x[i-1] - beta * x[i-1] * y[i-1]) * dt
 y[i] = y[i-1] + (delta * x[i-1] * y[i-1] - gamma * y[i-1]) * dt
 
 ax.plot(x, y, label='$y_0=%d$' % y0)
ax.grid(True)
ax.legend()
fig.savefig('predator_prey.svg',
 bbox_inches='tight', transparent=True)

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
https://creativecommons.org/licenses/by-sa/4.0CC BY-SA 4.0 Creative Commons Attribution-Share Alike 4.0 truetrue

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

copyright status<\/a>"}},"text\/plain":{"en":{"":"copyright status"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":50423863,\"id\":\"Q50423863\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P6216":"copyrighted<\/a>"}},"text\/plain":{"en":{"P6216":"copyrighted"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
inception<\/a>"}},"text\/plain":{"en":{"":"inception"}}},"{\"value\":{\"time\":\"+2018年12月20日T00:00:00Z\",\"timezone\":0,\"before\":0,\"after\":0,\"precision\":11,\"calendarmodel\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q1985727\"},\"type\":\"time\"}":{"text\/html":{"en":{"P571":"20 December 2018"}},"text\/plain":{"en":{"P571":"20 December 2018"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P571 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

20 December 2018

source of file<\/a>"}},"text\/plain":{"en":{"":"source of file"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":66458942,\"id\":\"Q66458942\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P7482":"original creation by uploader<\/a>"}},"text\/plain":{"en":{"P7482":"original creation by uploader"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current17:13, 20 December 2018 Thumbnail for version as of 17:13, 20 December 2018 466 ×ばつ 451 (47 KB)Krishnavedala Cross-wiki upload from en.wikipedia.org

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata

This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.

If the file has been modified from its original state, some details may not fully reflect the modified file.

Width372.425pt
Height360.738125pt

AltStyle によって変換されたページ (->オリジナル) /