File:Logistic iterates r=3.45.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(SVG file, nominally 3,600 × 3,600 pixels, file size: 216 KB)

Summary

Description
English: Logistic map iterates when r=3.45.

```python import numpy as np import matplotlib.pyplot as plt

def logistic_map(x, r):

   return r * x * (1 - x)

def function_iter(f, n, x, **kwargs):

   for _ in range(n):
       x = f(x, **kwargs)
   return x

r = 3.45 highest_exponent = 8 fig, axes = plt.subplots(nrows=highest_exponent, ncols=1, figsize=(40, 5 * highest_exponent))

x_values = np.linspace(0, 1, 10000) y_values = x_values last_n_iter = 0

for n in range(highest_exponent):

   ax = axes[n]
   n_iter = 2**n
   y_values = function_iter(logistic_map, n_iter - last_n_iter, y_values, r=r)
   last_n_iter = n_iter
   ax.plot(x_values, y_values, label=f'iteration = {2**n}', color='blue')
   ax.plot(x_values, x_values, linewidth=0.5, color='green')
   ax.hlines(0.5, 0, 1, linewidth=0.3, alpha=0.8, linestyle='--', color='black')
   ax.legend()

fig.suptitle(f'Iterates of the Logistic map with r = {r}',y=1.0) plt.tight_layout()

plt.savefig(f'logistic_iterates_{r}.svg') plt.show()

```
Date
Source Own work
Author Cosmia Nebula

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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

6 April 2024

image/svg+xml

File history

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

Date/TimeThumbnailDimensionsUserComment
current23:47, 6 April 2024Thumbnail for version as of 23:47, 6 April 20243,600 × 3,600 (216 KB)Cosmia NebulaUploaded while editing "Feigenbaum function" on en.wikipedia.org
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Metadata