File:Logistic Map Bifurcation Diagram, Matplotlib.svg

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

原始文件(SVG文件,尺寸为576 × 432像素,文件大小:771 KB)


摘要

描述
English: A bifurcation diagram for the Logistic map:
The horizontal axis is the r parameter, the vertical axis is the x variable. A starting value of x=0.25 was used, and the map was iterated 1000 times in order to stabilize the values of x. 1,000,000 x -values were then calculated for each value of r and for each x value, the corresponding (x,r) pixel in the image was incremented by one. All values in a column (corresponding to a particular value of r) were then multiplied by the number of non-zero pixels in that column, in order to even out the intensities. See File:Logistic Map Bifurcation Diagram, Matplotlib, zoomed.png for a vectorized and therefore much faster version of this Python script.
日期
来源 自己的作品
作者 Morn
SVG开发
InfoField
 
SVG的源代码为有效代码
 
矢量图使用Matplotlib创作。
源代码
InfoField

Python code

Source code
from pylab import *
from numpy import NaN
from matplotlib.colors import LogNorm

dr, dx = .001, .001
max_it = 1000000

R = arange(2.4, 4, dr)
X = arange(0, 1, dx)
Z = zeros((len(X), len(R)))

for ir, r in enumerate(R):
	print (ir, "of", len(R))
	z = .25
	for i in range(1000):
		z = r * z * (1 - z)
	for i in range(max_it):
		z = r * z * (1 - z)
		Z[-int(z / dx), ir] += 1
	Z[:, ir] *= count_nonzero(Z[:, ir])

Z = where(Z > 0, Z, NaN)
save("logmap", Z)	# save array to file

# pick color bar range:
zmi = .005 * nanmax(Z)
zma = .1   * nanmax(Z)

imshow(Z, cmap = plt.cm.viridis_r, vmin = zmi, vmax = zma,
  interpolation = 'none', norm = LogNorm(),
  extent = (R.min(), R.max(), X.min(), X.max()))
xlabel("r")
ylabel("x")
savefig("Logistic Map Bifurcation Diagram, Matplotlib.svg")
show()

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 4.0 国际许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
註解
InfoField
該圖片含有註解:在維基媒體共享資源上查看註解

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2019年1月19日 (六) 13:552019年1月19日 (六) 13:55版本的缩略图576 × 432(771 KB)Mornuse a million samples (less noise)
2019年1月19日 (六) 12:452019年1月19日 (六) 12:45版本的缩略图576 × 432(979 KB)MornUser created page with UploadWizard

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据