Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Percentage Formatter for Matplotlib

Generate Matplotlib percentage tick formatter code with preview. Choose 0–1 vs 0–100 data, decimals, symbol, LaTeX mode, and axis target (x/y/colorbar).

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.

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.

Continue your workflow

Browse related tools by task. Use the improved core tools for a consistent workspace with file import, downloads and clear validation errors.