What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-23 08:15:31
pyplot rectangle over image
import matplotlib.pyplot as plt import matplotlib.patches as patches from PIL import Image im = Image.open('stinkbug.png') # Create figure and axes fig, ax = plt.subplots() # Display the image ax.imshow(im) # Create a Rectangle patch rect = patches.Re... Add solution -
Other 2022-01-22 11:16:25
multiple edges in networkx
G=nx.MultiGraph ([(1,2),(1,2),(1,2),(3,1),(3,2)]) pos = nx.random_layout(G) nx.draw_networkx_nodes(G, pos, node_color = 'r', node_size = 100, alpha = 1) ax = plt.gca() for e in G.edges: ax.annotate("", xy=pos[e[0]], xycoords=... Add solution -
Python 2022-01-22 02:35:30
how to load wav file python
import matplotlib.pyplot as plt from scipy import signal from scipy.io import wavfile sample_rate, samples = wavfile.read('path-to-mono-audio-file.wav') frequencies, times, spectrogram = signal.spectrogram(samples, sample_rate) plt.pcolormesh(times, fre... Add solution