Note
Go to the endto download the full example code or to run this example in your browser via JupyterLite or Binder.
Using Unicode everywhere 🤗#
This example demonstrates how to include non-ASCII characters, mostly emoji 🎉to stress test the build and test environments that parse the example files.
# 🎉 👍# Code source: Óscar Nájera# License: BSD 3 clauseimportmatplotlib.pyplotaspltimportnumpyasnpplt.rcParams["font.size"]=20plt.rcParams["font.monospace"]=["DejaVu Sans Mono"]plt.rcParams["font.family"]="monospace"plt.figure()x=np.random.randn(100)*2+1y=np.random.randn(100)*6+3s=np.random.rand(*x.shape)*800+500plt.scatter(x,y,s,marker=r"$\oint$")x=np.random.randn(60)*7-4y=np.random.randn(60)*3-2s=s[:x.size]plt.scatter(x,y,s,alpha=0.5,c="g",marker=r"$\clubsuit$")plt.xlabel("⇒")plt.ylabel("⇒")plt.title("♲"*10)print("Std out capture 😎")# To avoid matplotlib text outputplt.show()

Std out capture 😎
Debug fonts
print(plt.rcParams)
_internal.classic_mode: Falseagg.path.chunksize: 0animation.bitrate: -1animation.codec: h264animation.convert_args: ['-layers', 'OptimizePlus']animation.convert_path: convertanimation.embed_limit: 20.0animation.ffmpeg_args: []animation.ffmpeg_path: ffmpeganimation.frame_format: pnganimation.html: noneanimation.writer: ffmpegaxes.autolimit_mode: dataaxes.axisbelow: lineaxes.edgecolor: blackaxes.facecolor: whiteaxes.formatter.limits: [-5, 6]axes.formatter.min_exponent: 0axes.formatter.offset_threshold: 4axes.formatter.use_locale: Falseaxes.formatter.use_mathtext: Falseaxes.formatter.useoffset: Trueaxes.grid: Falseaxes.grid.axis: bothaxes.grid.which: majoraxes.labelcolor: blackaxes.labelpad: 4.0axes.labelsize: mediumaxes.labelweight: normalaxes.linewidth: 0.8axes.prop_cycle: cycler('color', ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'])axes.spines.bottom: Trueaxes.spines.left: Trueaxes.spines.right: Trueaxes.spines.top: Trueaxes.titlecolor: autoaxes.titlelocation: centeraxes.titlepad: 6.0axes.titlesize: largeaxes.titleweight: normalaxes.titley: Noneaxes.unicode_minus: Trueaxes.xmargin: 0.05axes.ymargin: 0.05axes.zmargin: 0.05axes3d.automargin: Falseaxes3d.grid: Trueaxes3d.mouserotationstyle: arcballaxes3d.trackballborder: 0.2axes3d.trackballsize: 0.667axes3d.xaxis.panecolor: (0.95, 0.95, 0.95, 0.5)axes3d.yaxis.panecolor: (0.9, 0.9, 0.9, 0.5)axes3d.zaxis.panecolor: (0.925, 0.925, 0.925, 0.5)backend: aggbackend_fallback: Trueboxplot.bootstrap: Noneboxplot.boxprops.color: blackboxplot.boxprops.linestyle: -boxplot.boxprops.linewidth: 1.0boxplot.capprops.color: blackboxplot.capprops.linestyle: -boxplot.capprops.linewidth: 1.0boxplot.flierprops.color: blackboxplot.flierprops.linestyle: noneboxplot.flierprops.linewidth: 1.0boxplot.flierprops.marker: oboxplot.flierprops.markeredgecolor: blackboxplot.flierprops.markeredgewidth: 1.0boxplot.flierprops.markerfacecolor: noneboxplot.flierprops.markersize: 6.0boxplot.meanline: Falseboxplot.meanprops.color: C2boxplot.meanprops.linestyle: --boxplot.meanprops.linewidth: 1.0boxplot.meanprops.marker: ^boxplot.meanprops.markeredgecolor: C2boxplot.meanprops.markerfacecolor: C2boxplot.meanprops.markersize: 6.0boxplot.medianprops.color: C1boxplot.medianprops.linestyle: -boxplot.medianprops.linewidth: 1.0boxplot.notch: Falseboxplot.patchartist: Falseboxplot.showbox: Trueboxplot.showcaps: Trueboxplot.showfliers: Trueboxplot.showmeans: Falseboxplot.vertical: Trueboxplot.whiskerprops.color: blackboxplot.whiskerprops.linestyle: -boxplot.whiskerprops.linewidth: 1.0boxplot.whiskers: 1.5contour.algorithm: mpl2014contour.corner_mask: Truecontour.linewidth: Nonecontour.negative_linestyle: dasheddate.autoformatter.day: %Y-%m-%ddate.autoformatter.hour: %m-%d %Hdate.autoformatter.microsecond: %M:%S.%fdate.autoformatter.minute: %d %H:%Mdate.autoformatter.month: %Y-%mdate.autoformatter.second: %H:%M:%Sdate.autoformatter.year: %Ydate.converter: autodate.epoch: 1970-01-01T00:00:00date.interval_multiples: Truedocstring.hardcopy: Falseerrorbar.capsize: 0.0figure.autolayout: Falsefigure.constrained_layout.h_pad: 0.04167figure.constrained_layout.hspace: 0.02figure.constrained_layout.use: Falsefigure.constrained_layout.w_pad: 0.04167figure.constrained_layout.wspace: 0.02figure.dpi: 100.0figure.edgecolor: whitefigure.facecolor: whitefigure.figsize: [6.4, 4.8]figure.frameon: Truefigure.hooks: []figure.labelsize: largefigure.labelweight: normalfigure.max_open_warning: 20figure.raise_window: Truefigure.subplot.bottom: 0.11figure.subplot.hspace: 0.2figure.subplot.left: 0.125figure.subplot.right: 0.9figure.subplot.top: 0.88figure.subplot.wspace: 0.2figure.titlesize: largefigure.titleweight: normalfont.cursive: ['Apple Chancery', 'Textile', 'Zapf Chancery', 'Sand', 'Script MT', 'Felipa', 'Comic Neue', 'Comic Sans MS', 'cursive']font.family: ['monospace']font.fantasy: ['Chicago', 'Charcoal', 'Impact', 'Western', 'xkcd script', 'fantasy']font.monospace: ['DejaVu Sans Mono']font.sans-serif: ['DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif']font.serif: ['DejaVu Serif', 'Bitstream Vera Serif', 'Computer Modern Roman', 'New Century Schoolbook', 'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman', 'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter', 'serif']font.size: 20.0font.stretch: normalfont.style: normalfont.variant: normalfont.weight: normalgrid.alpha: 1.0grid.color: #b0b0b0grid.linestyle: -grid.linewidth: 0.8hatch.color: blackhatch.linewidth: 1.0hist.bins: 10image.aspect: equalimage.cmap: viridisimage.composite_image: Trueimage.interpolation: autoimage.interpolation_stage: autoimage.lut: 256image.origin: upperimage.resample: Trueinteractive: Falsekeymap.back: ['left', 'c', 'backspace', 'MouseButton.BACK']keymap.copy: ['ctrl+c', 'cmd+c']keymap.forward: ['right', 'v', 'MouseButton.FORWARD']keymap.fullscreen: ['f', 'ctrl+f']keymap.grid: ['g']keymap.grid_minor: ['G']keymap.help: ['f1']keymap.home: ['h', 'r', 'home']keymap.pan: ['p']keymap.quit: ['ctrl+w', 'cmd+w', 'q']keymap.quit_all: []keymap.save: ['s', 'ctrl+s']keymap.xscale: ['k', 'L']keymap.yscale: ['l']keymap.zoom: ['o']legend.borderaxespad: 0.5legend.borderpad: 0.4legend.columnspacing: 2.0legend.edgecolor: 0.8legend.facecolor: inheritlegend.fancybox: Truelegend.fontsize: mediumlegend.framealpha: 0.8legend.frameon: Truelegend.handleheight: 0.7legend.handlelength: 2.0legend.handletextpad: 0.8legend.labelcolor: Nonelegend.labelspacing: 0.5legend.loc: bestlegend.markerscale: 1.0legend.numpoints: 1legend.scatterpoints: 1legend.shadow: Falselegend.title_fontsize: Nonelines.antialiased: Truelines.color: C0lines.dash_capstyle: CapStyle.buttlines.dash_joinstyle: JoinStyle.roundlines.dashdot_pattern: [6.4, 1.6, 1.0, 1.6]lines.dashed_pattern: [3.7, 1.6]lines.dotted_pattern: [1.0, 1.65]lines.linestyle: -lines.linewidth: 1.5lines.marker: Nonelines.markeredgecolor: autolines.markeredgewidth: 1.0lines.markerfacecolor: autolines.markersize: 6.0lines.scale_dashes: Truelines.solid_capstyle: CapStyle.projectinglines.solid_joinstyle: JoinStyle.roundmacosx.window_mode: systemmarkers.fillstyle: fullmathtext.bf: sans:boldmathtext.bfit: sans:italic:boldmathtext.cal: cursivemathtext.default: itmathtext.fallback: cmmathtext.fontset: dejavusansmathtext.it: sans:italicmathtext.rm: sansmathtext.sf: sansmathtext.tt: monospacepatch.antialiased: Truepatch.edgecolor: blackpatch.facecolor: C0patch.force_edgecolor: Falsepatch.linewidth: 1.0path.effects: []path.simplify: Truepath.simplify_threshold: 0.111111111111path.sketch: Nonepath.snap: Truepcolor.shading: autopcolormesh.snap: Truepdf.compression: 6pdf.fonttype: 3pdf.inheritcolor: Falsepdf.use14corefonts: Falsepgf.preamble:pgf.rcfonts: Truepgf.texsystem: xelatexpolaraxes.grid: Trueps.distiller.res: 6000ps.fonttype: 3ps.papersize: letterps.useafm: Falseps.usedistiller: Nonesavefig.bbox: Nonesavefig.directory: ~savefig.dpi: figuresavefig.edgecolor: autosavefig.facecolor: autosavefig.format: pngsavefig.orientation: portraitsavefig.pad_inches: 0.1savefig.transparent: Falsescatter.edgecolors: facescatter.marker: osvg.fonttype: pathsvg.hashsalt: Nonesvg.id: Nonesvg.image_inline: Truetext.antialiased: Truetext.color: blacktext.hinting: force_autohinttext.hinting_factor: 8text.kerning_factor: 0text.latex.preamble:text.parse_math: Truetext.usetex: Falsetimezone: UTCtk.window_focus: Falsetoolbar: toolbar2webagg.address: 127.0.0.1webagg.open_in_browser: Truewebagg.port: 8988webagg.port_retries: 50xaxis.labellocation: centerxtick.alignment: centerxtick.bottom: Truextick.color: blackxtick.direction: outxtick.labelbottom: Truextick.labelcolor: inheritxtick.labelsize: mediumxtick.labeltop: Falsextick.major.bottom: Truextick.major.pad: 3.5xtick.major.size: 3.5xtick.major.top: Truextick.major.width: 0.8xtick.minor.bottom: Truextick.minor.ndivs: autoxtick.minor.pad: 3.4xtick.minor.size: 2.0xtick.minor.top: Truextick.minor.visible: Falsextick.minor.width: 0.6xtick.top: Falseyaxis.labellocation: centerytick.alignment: center_baselineytick.color: blackytick.direction: outytick.labelcolor: inheritytick.labelleft: Trueytick.labelright: Falseytick.labelsize: mediumytick.left: Trueytick.major.left: Trueytick.major.pad: 3.5ytick.major.right: Trueytick.major.size: 3.5ytick.major.width: 0.8ytick.minor.left: Trueytick.minor.ndivs: autoytick.minor.pad: 3.4ytick.minor.right: Trueytick.minor.size: 2.0ytick.minor.visible: Falseytick.minor.width: 0.6ytick.right: FalseTotal running time of the script: (0 minutes 1.226 seconds)
Estimated memory usage: 220 MB