Skip to content
Snippets Groups Projects
Commit ac87d178 authored by Hock, Martin's avatar Hock, Martin
Browse files

Delete ?test.py cause the name causes issues on windows OS and the contents...

Delete ?test.py cause the name causes issues on windows OS and the contents were only for example data creation
parent 34688ec8
No related branches found
No related tags found
3 merge requests!12v.0.1 for alpha release,!3Merge upstream changes for windows compatibility,!2Merge upstream changes for windows compatibility of branches
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 27 11:40:58 2021
@author: Richter
"""
from matplotlib import pyplot as plt
fig_size = (10, 5)
f = plt.figure(figsize=fig_size)
def plot_signal(time, signal, title='', xlab='', ylab='',
line_width=1, alpha=1, color='k',
subplots=False, show_grid=True, fig=f):
# Skipping a lot of other complexity here
axarr = f.add_subplot(1,1,1) # here is where you add the subplot to f
plt.plot(time, signal, linewidth=line_width,
alpha=alpha, color=color)
plt.set_xlim(min(time), max(time))
plt.set_xlabel(xlab)
plt.set_ylabel(ylab)
plt.grid(show_grid)
plt.title(title, size=16)
return(f)
time = [0:1:100]
signal= [200:300:100]
f = plot_signal(time, signal, fig=f)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment