File:Int function.svg

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Int_function.svg(SVG file, nominally 1,000 × 1,000 pixels, file size: 16 KB)

Graph of the int function, as in the C programming language.

Contents

[edit] Related images

[edit] Instructions

See Wikipedia graph-making tips.

Generated in gnuplot with the following script:

# Set square 1000×1000 SVG output and filename
# The font size (fsize) sets the size for the circles, too.
set terminal svg enhanced size 1000 1000 fname "Times" fsize 36
set output "int 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 [-3.5:3.5]
# Set x axis limits so the first and last points are hidden
set xrange [-3.5:3.5]

# No legend needed
set nokey

# Add lightly-colored axis lines
set yzeroaxis
set xzeroaxis

# Plot as lines and also points (circles)
plot "int function.dat" with lines
plot "int function.dat" with points 1 6

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

and data file:

int function.dat

#  X     Y1
   -4    -4
   Skip    
   -4    -3
   -3    -3
   Skip    
   -3    -2
   -2    -2
   Skip    
   -2    -1
   -1    -1
   Skip    
   -1    0 
   1     0 
   Skip    
   1     1 
   2     1 
   Skip    
   2     2 
   3     2 
   Skip    
   3     3 
   4     3 

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

[edit] Licensing

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:
Creative Commons license
Creative Commons Attribution iconCreative Commons Share Alike icon
This file is licensed under the Creative Commons Attribution ShareAlike 3.0, Attribution ShareAlike 2.5, Attribution ShareAlike 2.0 and Attribution ShareAlike 1.0 License. In short: you are free to share and make derivative works of the file under the conditions that you appropriately attribute it, and that you distribute it only under a license identical to this one. Official license.

Afrikaans | Беларуская | Български | Català | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | Estremeñu | Suomi | Français | עברית | Hrvatski | Հայերեն | Italiano | 日本語 | 한국어 | Lietuvių | Македонски | Plattdüütsch | Nederlands | ‪Norsk (bokmål)‬ | Occitan | Polski | Piemontèis | Português | Română | Русский | Slovenčina | ไทย | Vèneto | Tiếng Việt | 中文 | ‪中文(简体)‬ | ‪中文(繁體)‬ | +/−

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

Afrikaans | Alemannisch | 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 | Malti | Nnapulitano | Plattdüütsch | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Occitan | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | Kiswahili | తెలుగు | ไทย | Tagalog | Türkçe | Українська | اردو | Vèneto | 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/TimeThumbnailDimensionsUserComment
current18:15, 2 September 2006Thumbnail for version as of 18:15, 2 September 20061,000×1,000 (16 KB)Omegatron (Talk | contribs) (Reverted to earlier revision)
00:05, 22 May 2006Thumbnail for version as of 00:05, 22 May 20061,000×1,000 (16 KB)Omegatron (Talk | contribs) (i like blue better)
02:25, 11 April 2006Thumbnail for version as of 02:25, 11 April 20061,000×1,000 (15 KB)Omegatron (Talk | contribs) (test)

The following 4 pages on Wikimedia Commons link to this file. Some pages on other Wikimedia projects may also link to it.

Global file usage

The following other wikis use this file: