Image:Rectangular function.svg

From Wikipedia, the free encyclopedia

Rectangular_function.svg (SVG file, nominally 1300 × 975 pixels, file size: 15 KB)

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.

Graph of the Rectangular function. Attempt at better version of w:Image:rect function.png

[edit] Instructions

See Wikipedia graph-making tips.

Generated in gnuplot with the following script:

# Set 1300×975 SVG output and filename
# The font size (fsize) sets the size for the circles, too.
set terminal svg enhanced size 1300 975 fname "Times" fsize 36
set output "Rectangular function.svg"

# Set the text value for missing entries in the data file, so we can plot a discontinuous function
set datafile missing "Skip"  

# Set y axis limits so the plot doesn't go right to the edges of the graph 
set yrange [-0.5:1.5]
set xrange [-1.5:1.5]

set lmargin 5
set bmargin -5

# No legend needed
set nokey

# Add lightly-colored axis lines
set yzeroaxis
set xzeroaxis

# Put a tic at every half integer
set xtics 0.5
set ytics 0.5
set mxtics 4
set mytics 4

# Format tics as digit with one decimal place
set format x "%2.1f"
set format y "%2.1f"

# Plot as lines and also points
# Different line styles are plotted as separate lines for ease of post-processing
plot "solidlines.dat" with lines, "dashedlines.dat" with lines, "filledpoints.dat" with points pt 6, "hollowpoints.dat" with points pt 6
 
# with points:
# 1 = color red (linestyle 1?)
# 6 = point style 6 (render as circles in SVG)

# Close the file (so I don't have to close gnuplot to view it)
set output

and data files:

solidlines.dat

#   X       Y
    -1.5    0
    -0.5    0
    Skip
    -0.5    1
    0.5     1
    Skip
    0.5     0
    1.5     0

dashedlines.dat

#   X       Y
    -0.5    0
    -0.5    1
    Skip
    0.5     1
    0.5     0

filledpoints.dat

#   X       Y
    -0.5    0.5
    0.5     0.5

hollowpoints.dat

#   X       Y
    -0.5    0
    -0.5    1
    0.5     1
    0.5     0

Then I opened the resulting SVG file in Inkscape, changed the fill style for the circles (either blue or white fill), line styles (to do dashed lines), brought the plot lines to the top, and then brought the circles to the top (over the lines).

I also made all the lines 2 px wide, and made the axes 50% transparency.

[edit] License

Created by User:Omegatron using gnuplot, possibly with post-processing in the GIMP (PNG) or Inkscape (SVG)

I, the copyright holder of this work, hereby publish it under the following licenses:
Some rights reserved
Creative Commons Attribution iconCreative Commons Share Alike icon
This file is licensed under the Creative Commons Attribution ShareAlike license versions 3.0, 2.5, 2.0, and 1.0

Български | Català | Česky | Dansk | Deutsch | Ελληνικά | English | Español | Euskara | Estremeñu | Français | עברית | Italiano | 日本語 | 한국어 | Lietuvių | Nederlands | ‪Norsk (bokmål)‬  | Occitan | Polski | Piemontèis | Português | Русский | 中文 | +/-

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".

Aragonés | العربية | Asturianu | Български | বাংলা | ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী | Brezhoneg | Bosanski | Català | Cebuano | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | فارسی | Suomi | Français | Gaeilge | Galego | עברית | Hrvatski | Magyar | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Kurdî / كوردی | Latina | Lëtzebuergesch | Lietuvių | Bahasa Melayu | Nnapulitano | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Occitan | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | తెలుగు | ไทย | Türkçe | Українська | اردو | Tiếng Việt | Volapük | Yorùbá | ‪中文(中国大陆)‬ | ‪中文(台灣)‬ | +/-

You may select the license of your choice.

(In short, this means that you can copy and modify the image freely as long as you provide attribution; preferably in the form of a link back to this page.)

[edit] External links

File history

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

Date/TimeDimensionsUserComment
current03:51, 3 June 20061,300×975 (15 KB)Omegatron
02:21, 22 May 20061,000×750 (14 KB)Omegatron
02:20, 22 May 20061,000×750 (14 KB)Omegatron (oops)
02:19, 22 May 20061,000×750 (14 KB)Omegatron (2 px line thickness?)
02:17, 22 May 20061,000×750 (10 KB)Omegatron
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):