Topics

Matplotlib

About this topic: Articles tagged __TAG__

Showing 124 articles

Topics

Articles

Showing 124 articles

How-tos LaTeX Formulas in Matplotlib This tutorial explains how to render LaTeX formulas and equations in Matplotlib. Learn to create professional visualizations with LaTeX-enhanced titles, labels, and annotations. … How-tos How to Make a Square Plot With Equal Axes in Matplotlib We can use set_aspect() method and axis() method to make a square plot with equal axes in Matplotlib. How-tos How to Display an Image in Grayscale in Matplotlib This article introduces how to display a grayscale image in Matplotlib. How-tos Matplotlib Triangulation This post will help you to understand the Matplotlib triangulation. How-tos How to Save Plots as PDF File in Matplotlib Learn how to save plots as PDF files in Matplotlib using the savefig() function and PdfPages class. This guide covers saving single and multiple plots, along with customization … How-tos How to Set Tick Label in Scientific Notation in Matplotlib This article teaches you how to set tick labels in scientific notation using Matplotlib in Python. Learn about the `ticklabel_format()` function, `ScalarFormatter`, and … How-tos Differences Between cla(), clf(), and close() Functions in Matplotlib Compare the Matplotlib pyplot functions cla(), clf(), and close(): cla() clears the current Axes, clf() clears the current Figure, and close() closes a Figure managed by pyplot. … How-tos How to Add Text Inside the Plot in Matplotlib Learn how to use matplotlib.pyplot.text() to place labels at data coordinates, set axis limits, customize text, and add annotations or multi-line notes to Matplotlib plots. How-tos How to Create Density Plot in Matplotlib Estimate a density function from sample data with gaussian_kde() from scipy.stats and draw it with Matplotlib, or use kdeplot() from seaborn and kind='density' in … How-tos How to Add a Y-Axis Label to the Secondary Y-Axis in Matplotlib Learn how to add a y-axis label to the secondary y-axis in Matplotlib using the axes object and pandas DataFrame plot method. This guide provides step-by-step instructions, code … How-tos How to Plot Histogram for List of Data in Matplotlib Plot a histogram from a Python list with Matplotlib's plt.hist(), then adjust its bins, density, and color. How-tos How to Convert a NumPy Array to PIL Image in Python Convert NumPy arrays to Pillow images with Image.fromarray(). Learn how array shape, dtype, and value range affect grayscale, RGB, and Matplotlib-colormapped images, then resize … How-tos How to Create a Surface Plot in Matplotlib Learn how to create a Matplotlib 3D surface plot from grid-shaped data, then customize its colors, view, and saved figure. How-tos How to Plot Logarithmic Axes in Matplotlib Plot logarithmic axes in Matplotlib with set_yscale(), semilogy(), or loglog(). How-tos How to Plot a Circle in Matplotlib Draw a circle in Matplotlib with a Circle patch, its equation, or a scatter marker. How-tos How to Connect Scatterplot Points With Line in Matplotlib Connect Matplotlib scatterplot points in data order with plot(), style the line, and control which layer appears on top with zorder. How-tos How to Add Title to Subplots in Matplotlib We can add a title to subplots in Matplotlib using Axes.set_title(), Axes.title.set_text(), or pyplot's current axes (plt.gca()). How-tos How to Create a Single Legend for All Subplots in Matplotlib Learn how to create a single legend for all subplots in Matplotlib with our comprehensive guide. Discover effective methods like using fig.legend(), customizing legend placement, … How-tos How to Plot Two Histograms Together in Matplotlib Plot two histograms together in Matplotlib using grouped bars, transparent overlays, or separate subplots. Compare datasets with shared bins, labels, and styles. How-tos How to Rotate X-Axis Tick Label Text in Matplotlib Learn five ways to rotate Matplotlib x-axis tick labels and align them when long labels overlap. How-tos How to Plot Horizontal and Vertical Line in Matplotlib This tutorial introduces how to plot horizontal and vertical lines in Matplotlib with axhline and axvline, hlines and vlines, and the axhspan and axvspan shading functions. How-tos How to Show Pyplot Grid in Matplotlib Add a grid to a Matplotlib plot with grid(), customize its color and line style, and choose vertical or horizontal grid lines. How-tos How to Display an Image With Matplotlib Python Learn how to load and display a local image with Matplotlib's imshow(), display a PIL image, customize its appearance, and save the figure. How-tos How to Plot Smooth Curve in Matplotlib This tutorial explains how we can plot a smooth curve from given coordinates using the modules from the scipy and matplotlib package.

← All topics