File:Step function with three values (version 2).svg

Summary

Description
English: Step function with three different values
Date
Source Own work
Author Stephan Kulla (User:Stephan Kulla)
Other versions
SVG development
InfoField
Source code
InfoField

Python code

import matplotlib.pyplot as plt
import numpy as np

xs = np.linspace(0, 6, 7)
ys1 = [2,2,2,2,1,0,2]
ys2 = [2,2,0,1,0,0,1]

blue="#007ec1"
orange="#d77a5a"
green="#aecc51"

plt.step(xs, ys1, color=blue)
plt.savefig("Step function with three values (version 1).svg", transparent=True, bbox_inches="tight", pad_inches=0.05)

plt.clf()

plt.step(xs, ys2, color=green)
plt.savefig("Step function with three values (version 2).svg", transparent=True, bbox_inches="tight", pad_inches=0.05)

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Step%20function%20with%20three%20values%20(version%202).svg
Category:Self-published work Category:Step functions
Category:CC-Zero Category:Self-published work Category:Step functions Category:Valid SVG created with Matplotlib code