What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-28 20:47:12
matplotlib subplots size
f, axs = plt.subplots(2,2,figsize=(15,15)) Add solution -
Other 2021-10-28 02:12:09
Plot Wavelet modes
"""A visual illustration of the various signal extension modes supported in PyWavelets. For efficiency, in the C routines the array is not actually extended as is done here. This is just a demo for easier visual explanation of the behavior ... Add solution -
Python 2021-10-24 10:07:08
change xlabel python
import matplotlib.pyplot as plt fig, ax = plt.subplots() # We need to draw the canvas, otherwise the labels won't be positioned and # won't have values yet. fig.canvas.draw() labels = [item.get_text() for item in ax.get_xticklabels()] labels[1] = 'Tes... Add solution -
Python 2021-10-22 13:17:03
pandas creating multiple grid subplots
plt.figure(figsize=(10, 12)) # The first subplot plt.subplot(3, 2, 1) plt.plot(traffic_per_day['Monday']['Hour (Coded)'], traffic_per_day['Monday']['Slowness in traffic (%)']) plt.title('Monday') # The second subplot plt.subplot(3, 2, 2) plt.plo... Add solution -
Python 2021-10-20 14:20:10
python convert ylabel to currency
import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as ticker # Fixing random state for reproducibility np.random.seed(19680801) fig, ax = plt.subplots() ax.plot(100*np.random.rand(20)) formatter = ticker.FormatStrFormatter('$%1... Add solution -
Other 2021-10-20 08:32:13
sklearn random forest feature importance
import pandas as pd forest_importances = pd.Series(importances, index=feature_names) fig, ax = plt.subplots() forest_importances.plot.bar(yerr=std, ax=ax) ax.set_title("Feature importances using MDI") ax.set_ylabel("Mean decrease in impuri... Add solution -
Python 2021-10-19 12:50:14
seaborn create horizontal bar graph
import seaborn as sns import matplotlib.pyplot as plt sns.set_theme(style="whitegrid") # Initialize the matplotlib figure f, ax = plt.subplots(figsize=(6, 15)) # Load the example car crash dataset crashes = sns.load_dataset("car_crashes&q... Add solution