What do you want to save?
Add Code snippet
New code examples
-
Python 2021-08-31 15:09:01
change ticks font size matplotlib python
from matplotlib import pyplot as plt from datetime import datetime, timedelta xvalues = range(10) yvalues = xvalues fig,ax = plt.subplots() plt.plot(xvalues, yvalues) plt.xticks(fontsize=16) # sets font size of xticks to 16 (respective of yticks) plt.... Add solution -
Python 2021-08-31 10:55:04
matplotlib plt.sapect
plt.figure(figsize=(10,3)) plt.plot(x,y) plt.show() Add solution -
Go 2021-08-30 19:28:01
matplotlib logo image on a plot
import matplotlib.image as image import matplotlib.pyplot as plt im = image.imread('debian-swirl.png') fig, ax = plt.subplots() ax.imshow(im, aspect='auto', extent=(0.4, 0.6, .5, .7), zorder=-1) ax.yaxis.tick_left() ax.tick_params(axis='y', colors='black... Add solution -
Python 2021-08-30 02:10:02
numpy histogram 0 to 100 percent
kwargs2 = dict(histtype='step') fig, ax1=plt.subplots(1,1,sharey=True, facecolor='w',figsize=(8,6)) counts_zi, bins_zi = np.histogram(np.array(dt_mu_zi)*60) ax1.hist(bins_zi[:-1], bins_zi, weights=100*counts_zi/counts_zi.sum(),color='red', **kwargs2) x0... Add solution