File:Arrow diagram of a function (non-injective and non-surjective).svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file (SVG file, nominally 300 × 314 pixels, file size: 20 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
Português: Diagrama de uma função f de um conjunto A sobre um conjunto B.
English: Arrow diagram of a function f from a set A on a set B.
Date
Source Own work
Author Picknick

Código fonte

[edit]
#!/usr/bin/env python
# -*- coding: utf-8 -*- 
'''
Este trabalho está licenciado sob a Licença Creative Commons 
Atribuição-CompartilhaIgual 4.0 Internacional. Para ver uma cópia desta licença,
visite https://creativecommons.org/licenses/by-sa/4.0/ ou envie uma carta 
para Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
'''

import matplotlib.pylab as plt
from matplotlib.patches import Ellipse
from matplotlib.patches import Circle

fig = plt.figure(figsize = (4,4), dpi=100, frameon=False)
ax = plt.subplot(1,1,1)
plt.axis('off')

#x - axis
ax.set_xlim((0,10))

#y- axis
ax.set_ylim((1,9))

#set A
eA = Ellipse((1.75,4.5),3,7,fill=False)
ax.add_artist(eA)
plt.text(1.45,8.25,'$A$',fontsize=14)
c = Circle((1.9,7),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((1.4,6),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((1.8,5),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((1.3,4),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((2,3),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((1.5,2),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((1.2,3.5),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((1.8,4.5),0.1,fill=True,facecolor='black')
ax.add_artist(c)


#set B
eB = Ellipse((8,4.5),3,7,fill=False)
ax.add_artist(eB)
plt.text(7.7,8.25,'$B$',fontsize=14)
c = Circle((8.2,7),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((7.7,6),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((8.1,5),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((7.6,4),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((8.3,3),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((7.9,2),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((8.2,3.5),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((8.4,6.5),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((8.6,5.75),0.1,fill=True,facecolor='black')
ax.add_artist(c)
c = Circle((8.05,4.25),0.1,fill=True,facecolor='black')
ax.add_artist(c)

#relations
plt.arrow(2.1,7,5.9,0,head_width=0.2,length_includes_head=True, facecolor='black')
plt.arrow(1.6,6,6.25,-1.7,head_width=0.2,length_includes_head=True, facecolor='black')
plt.arrow(2,5,5.5,1.05,head_width=0.2,length_includes_head=True, facecolor='black')
plt.arrow(1.6,4,6.5,-0.975,head_width=0.2,length_includes_head=True, facecolor='black')
plt.arrow(2.2,3,5.5,-0.95,head_width=0.2,length_includes_head=True, facecolor='black')
plt.arrow(1.7,2,5.9,3.85,head_width=0.2,length_includes_head=True, facecolor='black')

#function name
plt.text(4.75,7.5,'$f$',fontsize=14)

#an pair (x,f(x))
plt.text(0.8,6,'$x$',fontsize=14)
plt.text(8.25,4.15,'$f(x)$',fontsize=14)


plt.savefig('Venn_diagram_function.svg', bbox_inches='tight', pad_inches=0.0)

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 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.
  • 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.

File history

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

Date/TimeThumbnailDimensionsUserComment
current17:50, 2 July 2016Thumbnail for version as of 17:50, 2 July 2016300 × 314 (20 KB)Picknick (talk | contribs)Representação de elementos extras no conjunto A e de um exemplo de um par ordenado (x,f(x)).
02:54, 2 July 2016Thumbnail for version as of 02:54, 2 July 2016300 × 314 (15 KB)Picknick (talk | contribs)User created page with UploadWizard

The following 2 pages use this file:

File usage on other wikis

The following other wikis use this file:

Metadata