Skip to tool
FeuTex · free tools runs in-browser no bloat built by LiMiT

Percentage Formatter for Matplotlib

Build a clean percentage tick formatter for Matplotlib in seconds. Pick whether your data is in 0–1 or already 0–100, choose decimals/symbol, and get a ready-to-paste PercentFormatter or FuncFormatter snippet with a quick label preview.

Category: Finance · URL: /tools/percentage-formatter-matplotlib.html
Tick values to preview (comma/space separated). Leave blank to auto-fill.
Output

  
Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Use this to generate a formatter snippet and preview labels for your tick values.

  1. Select your data scale: 0–1 (fractions) or 0–100 (already percent).
  2. Set decimals and symbol (usually %), and pick the target (x-axis, y-axis, or colorbar).
  3. Click Generate to get code plus a quick tick label preview. Copy and paste into your plot.
Keywords this page targets (natural cluster): percentage formatter matplotlib, matplotlib percent formatter, mtick.PercentFormatter example, matplotlib tick labels as percent, format y axis as percentage matplotlib, format x axis as percentage matplotlib, matplotlib percentage ticks 0-1, matplotlib percentage ticks 0-100, matplotlib ticker FuncFormatter percent, matplotlib percent decimals, matplotlib percent sign on axis, matplotlib percent formatter latex, matplotlib percent formatter colorbar, percent axis labels matplotlib, format seaborn axis as percent, matplotlib percent formatter xmax, python plot percentages on y axis, matplotlib tick formatting percent symbol, custom percent tick formatter matplotlib, matplotlib percentage label formatter function, show 12.5% on matplotlib ticks, matplotlib percent formatting without scientific notation
Secondary intents covered: Generate paste-ready Matplotlib code to format axis ticks as percentages, Decide whether to use PercentFormatter or a custom FuncFormatter, Convert 0–1 fractional data into 0–100% tick labels, Control decimal places and the percent symbol in tick labels, Format x-axis, y-axis, or colorbar ticks as percentages, Preview how specific tick values will render before coding, Enable LaTeX-style percent formatting for Matplotlib text rendering, Create consistent percentage formatting for finance charts and dashboards

FAQ

Should I use xmax=1 or xmax=100 in PercentFormatter?

Use xmax=1 when your data is 0–1 fractions, and xmax=100 when your data is already 0–100.

How do I format the y-axis as percent in Matplotlib?

Apply the formatter to ax.yaxis with ax.yaxis.set_major_formatter(...) using either mtick.PercentFormatter or mtick.FuncFormatter.

How do I format the x-axis ticks as percentages?

Use ax.xaxis.set_major_formatter(...) with the same formatter; only the target axis changes.

Why do my percentages look like 2500%?

You likely used xmax=1 while your data is 0–100, or you multiplied by 100 in a custom formatter when the data was already percent.

Can I control decimal places (e.g., 12.5%)?

Yes—set decimals in PercentFormatter or use an f-string format in FuncFormatter.

How do I format a colorbar in percent?

Use cbar.ax.yaxis.set_major_formatter(...) after creating the colorbar.

When should I use FuncFormatter instead of PercentFormatter?

Use FuncFormatter when you want full control (signs, custom text) or need a simple fallback across environments.