File:Log-log plot example.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 360 × 360 pixels, file size: 6 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: Example of a log–log plot with a line
    Date
    Source Own work
    Author M. W. Toews
    SVG development
    InfoField
     The SVG code is valid.
     This chart was created with R.
     This file uses translateable embedded text.
    Source code
    InfoField

    R code

    library("sfsmisc")
    
    xlim <- c(1e0, 1e4)
    ylim <- c(1e-2, 1e4)
    
    svg("log-log_plot_example.svg", width=4, height=4)
    par(mar=c(2.1, 2.6, 0.6, 1.1))
    plot.default(x=NA, log="xy",
                 xlim=xlim, ylim=ylim, bty="n",
                 xaxt="n", yaxt="n",
                 xaxs="i", yaxs="i",
                 xlab=NA, ylab=NA)
    
    # Outer axis ticks and labels
    x.minor <- eaxis(1, n.axp=1)
    y.minor <- eaxis(2, n.axp=1)
    
    # Draw grid lines
    abline(v=x.minor, col="#DDDDDD")
    abline(h=y.minor, col="#DDDDDD")
    abline(v=10 ^ seq(log10(xlim[1]), log10(xlim[2])), col="#AAAAAA")
    abline(h=10 ^ seq(log10(ylim[1]), log10(ylim[2])), col="#AAAAAA")
    
    # Example line
    abline(4, -2, col="#000066", lwd=2)
    text(10, 200, adj=0,
         expression(log[10](italic(F(x))) == -2 * log[10](italic(x)) + 4))
    box()
    dev.off()
    

    Licensing

    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

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    10 October 2017

    image/svg+xml

    5,870 byte

    6972c52536216d8b9d69dcb09222a655f0deef77

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current20:49, 14 April 2020Thumbnail for version as of 20:49, 14 April 2020360 × 360 (6 KB)wikimediacommons>GKFXClearer text

    There are no pages that use this file.