File:Mpl example line plot.svg

Uploaded by Adrien F. Vincent
Upload date 2016-09-27T09:52:35Z
MIME type image/svg+xml
Dimensions 720 × 540 px
File size 16.3 KB

Summary

Description
English: Basic line plot with matplotlib
Date
Source Own work
Author Adrien F. Vincent
SVG development
InfoField
 The SVG code is valid.
 This plot was created with Matplotlib.

Rationale: this work aims at providing an updated version of the previous work https://commons.wikimedia.org/wiki/File:Matplotlib_basic_v.svg , done by IkamusumeFan,

Source code has been (very) slightly modified into fully object-oriented matplotlib interface. The original shebang was also removed.

The matplotlib (mpl) version is 1.5.3, with Python 2.7 and numpy 1.10

Source code

The logo of Matplotlib – comprehensive library for creating static, animated, and interactive visualizations in Python
The logo of Matplotlib – comprehensive library for creating static, animated, and interactive visualizations in Python
This media was created with Matplotlib (comprehensive library for creating static, animated, and interactive visualizations in Python) and Python (general-purpose programming language) and NumPy (numerical programming package for the Python programming language)
Here is a listing of the source used to create this file.

Deutsch  English  +/−

##########
## Code for the figure
##########
"""This generates the graph of the function f(x) = exp(-x)."""

import matplotlib.pyplot as plt
import numpy as np

fig, ax = plt.subplots()

x = np.linspace(0, 10, 100)
y = np.exp(-x)
ax.plot(x, y)

fig.savefig("matplotlib_basic.svg")
plt.show()
##########

Licensing

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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

26 September 2016

Category:CC-BY-SA-4.0 Category:Exponential functions Category:Images with Matplotlib source code Category:Images with NumPy source code Category:Images with Python source code Category:Self-published work Category:Valid SVG created with Matplotlib