Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for Software 22.04.
Download
182 views
ubuntu2204-dev
Kernel: Python 3 (system-wide)
import scienceplots import numpy as np
import matplotlib.pyplot as plt #plt.style.reload_library() # https://github.com/garrettj403/SciencePlots/wiki/Gallery#styles-for-specific-academic-journals plt.rcParams.update({'figure.dpi': '150'})
plt.style.available
['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'bright', 'cjk-jp-font', 'cjk-kr-font', 'cjk-sc-font', 'cjk-tc-font', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'grid', 'high-contrast', 'high-vis', 'ieee', 'latex-sans', 'light', 'muted', 'nature', 'no-latex', 'notebook', 'pgf', 'retro', 'russian-font', 'sans', 'scatter', 'science', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 'seaborn-v0_8-whitegrid', 'std-colors', 'tableau-colorblind10', 'turkish-font', 'vibrant']
def model(x, p): return x ** (2 * p + 1) / (1 + x ** (2 * p)) pparam = dict(xlabel='Voltage (mV)', ylabel=r'Current ($\mu$A)') x = np.linspace(0.75, 1.25, 201)
plt.style.use('science') fig, ax = plt.subplots() for p in [10, 15, 20, 30, 50, 100]: ax.plot(x, model(x, p), label=p) ax.legend(title='Order') ax.autoscale(tight=True) ax.set(**pparam) plt.show()
Image in a Jupyter notebook
plt.style.use('ieee') plt.rcParams.update({'figure.dpi': '150'}) fig, ax = plt.subplots() for p in [10, 15, 20, 30, 50, 100]: ax.plot(x, model(x, p), label=p) ax.legend(title='Order') ax.autoscale(tight=True) ax.set(**pparam) plt.show()
Image in a Jupyter notebook