File:Przyklad wykresu.svg

Summary

Description
Polski: Przykład wykonania prostych wykresów dwóch funkcji w Python
English: An example of creating simple plots of two functions in Python.
Date
Source Own work
Author Tomasz59


SVG development

InfoField
 The SVG code is valid.
 This plot was created with Matplotlib.
Category:Valid SVG created with Matplotlib code#Przyklad%20wykresu.svg

Source code

Python code

import numpy as np
import matplotlib.pyplot as plt

# dane
x = np.linspace(0, 12, 1000)
y1 = np.sin(x)
y2 = 0.5*np.cos(x)

# wykresy
plt.plot(x, y1, label="sin(x)")
plt.plot(x, y2, label="0.5*cos(x)")

plt.title("Wykresy funkcji", fontsize=24)
plt.xlabel("x", fontsize=20)
plt.ylabel("y", fontsize=20)

plt.xticks(np.arange(0, 12.1,3), fontsize=18)    # liczby na osi x
plt.yticks(np.arange(-1, 1.1, 0.5), fontsize=18) # liczby na osi y

plt.grid()
plt.legend(fontsize=18)

# zapis do pliku SVG
plt.savefig("Przyklad_wykresu.svg", format="svg", bbox_inches="tight")

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.
Category:Creative Commons Attribution-Share Alike missing SDC copyright status Category:CC-BY-SA-4.0#Przyklad%20wykresu.svg Category:Creative Commons Attribution-Share Alike 4.0 missing SDC copyright licenseCategory:Self-published workCategory:Self-published work missing SDC copyright license
Category:Python (programming language) Category:Matplotlib SVG substitution
Category:CC-BY-SA-4.0 Category:Creative Commons Attribution-Share Alike 4.0 missing SDC copyright license Category:Creative Commons Attribution-Share Alike missing SDC copyright status Category:Matplotlib SVG substitution Category:Python (programming language) Category:Self-published work Category:Self-published work missing SDC copyright license Category:Valid SVG created with Matplotlib code