File:LogisticMapOrbitDiag InclNegR.png

From testwiki
Jump to navigation Jump to search
    Original file (9,600 × 5,400 pixels, file size: 1.24 MB, MIME type: image/png)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Created using the following code adapted from code from Wikipedia Logistic map article:
    import numpy as np
    import matplotlib.pyplot as plt
    
    preset = 1
    if preset == 1: # Complete diagram, including the negative r
      saveFigure = True
      markerSize = 0.001
      markerStyle = "," # . - point; , - pixel
      rInterval = (-2.1, 4)
      rResolution = 0.0005
      mapIterationCount = 1000
      lastMapIterationCountToPlot = 1000
      startingIterationValue = 0.5
      fileName = "LogisticMapOrbitDiag_InclNegR.png"
    
    yLim = (-0.6, 1.6)
    
    lims = np.zeros(mapIterationCount)
    
    fig, biax = plt.subplots()
    fig.set_size_inches(16, 9)
    
    for r in np.arange(rInterval[0], rInterval[1], rResolution):
      lims[0] = startingIterationValue
      for i in xrange(mapIterationCount - 1):
        lims[i + 1] = r * lims[i] * (1 - lims[i])
    
      biax.plot([r] * lastMapIterationCountToPlot,
                lims[(mapIterationCount - lastMapIterationCountToPlot):], "b.",
                markersize=markerSize,
                marker=markerStyle)
    
    biax.set(xlabel="c", ylabel="x",
             title="Logistic map - r * x (1 - x) - bifurcation diagram/orbit diagram" + "\n"
                   "r resolution: " + str(rResolution) +
                   ", iteration count: " + str(mapIterationCount) +
                   ", last values to plot count: " + str(lastMapIterationCountToPlot))
    
    biax.set_ylim(yLim[0], yLim[1])
    if saveFigure:
      plt.savefig(fileName, dpi=600)
    else:
      plt.show()
    
    Date
    Source Own work
    Author Dan Polansky

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution
    This file is licensed under the Creative Commons Attribution 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.

    Captions

    An orbit diagram of the logistic map showing the negative r-values as well positive ones

    Items portrayed in this file

    depicts

    6 February 2024

    1,295,053 byte

    5,400 pixel

    9,600 pixel

    image/png

    15bb618b1671ec6ac80b6483350b2e2d57826224

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current15:06, 6 February 2024Thumbnail for version as of 15:06, 6 February 20249,600 × 5,400 (1.24 MB)wikimediacommons>Dan PolanskyUploaded own work with UploadWizard

    There are no pages that use this file.