File:AliasingSines.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 675 × 225 pixels, file size: 2 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: A graph showing aliasing of an f=0.9 sine wave by an f=0.1 sine wave by sampling at a period of T=1.0, based on the raster image File:AliasingSines.png.
    Français : Une graphique qui démontre le crénelage d'un signal sinusoïdal de fréquence f=0.9, confondu avec un signal de fréquence f=0.1 lors d'un échantillonnage de période T=1.0, basée sur l'image matricielle File:AliasingSines.png.
    Date
    Source Own work
    Author Moxfyre
    Other versions File:AliasingSines.png
    SVG development
    InfoField
     The SVG code is valid.
     This plot was created with Matplotlib.
    Source code
    InfoField

    Python code

    #!/usr/bin/python2.5
    
    from pylab import *
    from numpy import *
    
    # create a figure
    figure(figsize=(7.5,2.5))
    rcParams.update({"figure.subplot.left":0.05, "figure.subplot.right":0.95,
                     "figure.subplot.bottom":0.1, "figure.subplot.top":0.9,
                     "svg.embed_char_paths":False})
    
    # x coords from -1 to 11
    x_fine = linspace(-0.4, 10.4, 1000)
    x_coarse = linspace(0, 10, 11)
    
    # sinewave w/ freq=0.9
    y1 = sin(2*pi * 0.9 * (x_fine-0.5))
    plot( x_fine, y1, "-", color="red")
    
    # sinewave w/ freq=0.1
    y2 = sin(2*pi * 0.1 * (x_fine-0.5))
    plot(x_fine, y2, "-", color="blue")
    
    # show aliasing
    y3 = sin(2*pi * 0.1 * (x_coarse-0.5))
    plot( x_coarse, y3, "o", color="black" )
    vlines( x_coarse, 0, y3, color="black" ) # add the "lollipop" points
    
    # set window and tick labels
    axis([-0.5, 10.5, -1.1, 1.1])
    yticks((-1.0,0,1.0), ('',0,''))
    xticks(linspace(0,10,11))
    
    # save it
    savefig("AliasingSines.svg", transparent=True)
    

    Licensing

    GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License. Subject to disclaimers.
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 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

    21 April 2009

    image/svg+xml

    b74229f56b1ca2e46c9c59036cd37bd775391636

    2,361 byte

    225 pixel

    675 pixel

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current17:31, 10 June 2019Thumbnail for version as of 17:31, 10 June 2019675 × 225 (2 KB)wikimediacommons>JarvisaSimplified SVG source

    There are no pages that use this file.