File:Area under rectangular hyperbola.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 540 × 540 pixels, file size: 62 KB)

    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: The five coloured regions are of equal area, and define units of hyperbolic angle along the hyperbola xy = 1
    Português: As cinco regiões coloridas possuem a mesma área, e definem unidades de ângulo hiperbólico junto com a hipérbole xy = 1
    Date
    Source

    Own work

     This plot was created with Matplotlib.
    Author Vickvvy & Lenin.castilhos

    Matplotlib (Python)

    # Author: Vickvvy, 2023-12-14
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    def f(x):
      return 1/x
    
    x = np.linspace(0.01, 8, 1000)
    y = f(x)
    
    fig, ax = plt.subplots(figsize=(6, 6))
    ax.plot(x, y)
    
    ax.set_xlim(0, 8)
    ax.set_ylim(0, 8)
    
    plt.xticks([1,np.e,np.exp(2)],labels=["1","e","e^2"])
    plt.yticks([1,np.e,np.exp(2)],labels=["1","e","e^2"])
    
    plt.fill_between(x, 1, where=(x>=0) & (x<=1),color='blue', alpha=0.2)
    
    plt.fill_between(x, y, where=(x>1) & (x<=np.e),color='red', alpha=0.2)
    plt.fill_betweenx(x, y, where=(x>1) & (x<=np.e),color='red', alpha=0.2)
    
    plt.fill_between(x, y, where=(x>np.e) & (x<=np.exp(2)),color='blue', alpha=0.2)
    plt.fill_betweenx(x, y, where=(x>np.e) & (x<=np.exp(2)),color='blue', alpha=0.2)
    
    plt.plot(x, y, color="blue")
    plt.savefig("xy=1.svg", format='svg')
    

    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

    14 December 2023

    image/svg+xml

    63,681 byte

    916ef48a4b64a17cbf5639da72c27259ba6cf25b

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current12:27, 15 December 2023Thumbnail for version as of 12:27, 15 December 2023540 × 540 (62 KB)wikimediacommons>Vickvvyremoved white background

    There are no pages that use this file.