What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-21 19:03:18
python plot a dictionary
# credit to the Stack Overflow user in the source link import matplotlib.pylab as plt lists = sorted(d.items()) # sorted by key, return a list of tuples x, y = zip(*lists) # unpack a list of pairs into two tuples plt.plot(x, y) plt.show() Add solution -
Python 2021-11-21 15:33:27
skimage marching cubes lewiner
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.art3d import Poly3DCollection from skimage import measure from skimage.draw import ellipsoid # Generate a level set about zero of two identical ellipsoids in 3D ellip_base = e... Add solution -
Python 2021-11-21 04:24:16
python seaborn violin stack overflow
import matplotlib.pyplot as plt import seaborn as sns x = ["G","F","E","D","C","B"] y = [3,14,45,47,34,15] data = [] for i, yi in enumerate(y): data.extend([i]*yi) sns.violinplot(y=data) p... Add solution -
Python 2021-11-21 03:29:22
arduino python matplotlib line
import serial # import Serial Library import numpy # Import numpy import matplotlib.pyplot as plt #import matplotlib library from drawnow import * tempF= [] pressure=[] arduinoData = serial.Serial('com11', 115200) #Creating our serial ob... Add solution -
Python 2021-11-20 22:39:18
python plot map with geolocation arrays
from mpl_toolkits.basemap import Basemap from mpl_toolkits.basemap import addcyclic import matplotlib.pyplot as plt import numpy as np map = Basemap(projection='sinu', lat_0=0, lon_0=0) lons = np.arange(30, 390, 30) lats = np.arange(0, 10... Add solution -
Python 2021-11-20 09:17:57
central limit theorem python example
import numpy as npimport matplotlib.pyplot as pltdef repeat_sample_draws_exponential(n, samp_size, mu, show_all=False): means = [] samples = [] for ii in range(0, n): samples.append(np.random.exponential(mu, samp_size)) means.append... Add solution