Skip to content
Snippets Groups Projects

Merge upstream changes for windows compatibility

Merged Hock, Martin requested to merge dev into ci-cd
1 file
+ 0
32
Compare changes
  • Side-by-side
  • Inline
+ 0
32
# -*- 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
Loading