What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-16 03:26:10
simple pendulum with image processing code
import numpy as np from scipy.integrate import odeint import math import matplotlib.pyplot as plt """ damping: effects that reduce the amplitude of the vibrations """ def ode_func(theta,t,b,g,l,m): theta1=theta[0] thet... Add solution -
Python 2021-10-09 03:52:08
saving 3D plots on python as png
#where to save the figures PROJECT_ROOT_DIR = "." CHAPTER_ID = "classification" IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, "images", CHAPTER_ID) os.makedirs(IMAGES_PATH, exist_ok = True) def save_fig(fig_id, tight_layout=T... Add solution -
Python 2021-09-28 21:03:03
matplotlib multiple plots with different size
import numpy as np import matplotlib.pyplot as plt # generate some data x = np.arange(0, 10, 0.2) y = np.sin(x) # plot it f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]}) a0.plot(x, y) a1.plot(y, x) f.tight_layout() f.savefig('gr... Add solution