File:Uniform distribution.svg

Summary

Description
English: Probability density function for the uniform distribution.
Date
Source Own work
Author Ben Moore
Other versions
SVG development
InfoField
 The SVG code is valid.
 This trigonometry was created with R.
Category:Valid SVG created with R#Uniform%20distribution.svg
 and with Inkscape.
Category:SVG created also with Inkscape

Licensing

Ben Moore, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Attribution:
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.
Category:CC-BY-SA-3.0#Uniform%20distribution.svgCategory:Self-published work

Source code

Figure can be generated with the following R code (slightly tweaked in Inkscape afterwards).

svg("figs/uniform.svg", 3.5, 3)
par(mar=c(3,3,0.2,0.2), mgp=c(2,.35,0), lwd=2)
#set up plot area
plot(1:5, seq(0, 3, length.out=5), ylab="",
     type="n", axes=F, xlab="", frame=T)

#horizontal blue lines
segments(0,0,2,0, col="blue")
segments(4,0,6,0, col="blue")
segments(2,2,4,2, col="blue")
#axes
axis(1, lwd=1, tck=-.015, at=c(2,4), 
     labels=c("a", "b"), line=-0)
axis(2, tck=-.015, at=2, label=expression(frac(1,b-a)), las=1)

#vertical dashed lines
segments(2,0,2,2, lty=2, col="blue")
segments(4,0,4,2, lty=2, col="blue")

#points
points(matrix(c(2,0,4,0), ncol=2, byrow=T), 
       pch=21, bg="white", col="blue")
points(matrix(c(2,2,4,2), ncol=2, byrow=T), 
       pch=21, col="blue", bg="blue")
dev.off()
Category:Functions (mathematics) Category:Line charts
Category:CC-BY-SA-3.0 Category:Functions (mathematics) Category:Line charts Category:SVG created also with Inkscape Category:Self-published work Category:Valid SVG created with R