File:Complex sin abs 01 Pengo.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 720 × 540 pixels, file size: 371 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: abs(sin(z))
    Date
    Source Own work, based on Complex sine.svg by Dave Farrance (public domain).
    Author Pengo
    Other versions

    sin(z):

    SVG development
    InfoField
     The SVG code is valid.
     This plot was created with Matplotlib.
    Source code
    InfoField

    Python code

    #!/usr/bin/env python
     
    """This generates four graphs for sin(z)."""
    # Origin: Peter Halasz. 2010-09-14
    # Enhanced: Ika. 2013-07-23
     
    import numpy as np
    from pylab import *
    from mpl_toolkits.mplot3d import Axes3D
     
    graphs = {'abs':abs, 'real':real, 'imag':imag, 'angle':angle}
     
    for gr in graphs:
            ax = Axes3D(figure(), azim = -135, elev = 45)
            X = arange(-2*pi, 2*pi, pi/12)
            Y = arange(-2, 2, pi/12)
            X, Y = meshgrid(X, Y)
            fn = graphs[gr]
            Z = fn(sin(X + Y*1j))  # abs, real, imag, angle. angle range [-pi, pi]
            ax.plot_surface(X, Y, Z, rstride = 1, cstride = 1, cmap = cm.jet)
            ax.contour(X, Y, Z, zdir='z', offset=np.min(Z))
            ax.set_xlabel("x")
            ax.set_ylabel("y")
            ax.set_zlabel(gr + '(sin(x+iy))')
            plt.savefig("complex_sin_" + gr + "_01_Pengo.svg")
    

    Licensing

    Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
    In some countries this may not be legally possible; if so:
    I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    14 September 2010

    image/svg+xml

    a4514d8f022d224fdc7a3b638e4855cc779e0875

    380,136 byte

    540 pixel

    720 pixel

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current04:18, 24 July 2013Thumbnail for version as of 04:18, 24 July 2013720 × 540 (371 KB)wikimediacommons>IkamusumeFanAdd X-Y contour.

    There are no pages that use this file.