Skip to content

[Feature Request] Proper Arabic Language Support in Matplotlib Plots #29806

Open
@ahmadmarzok

Description

@ahmadmarzok

Description

Currently, when using Arabic text in Matplotlib plots (titles, labels, legends), the text appears incorrectly due to:

  1. Left-to-right rendering instead of proper right-to-left.
  2. Arabic characters are shown as disconnected (e.g., "ت ش ا ت" instead of "تشات").
  3. Usage of fonts that lack Arabic support, resulting in broken symbols or empty boxes.

This greatly affects the usability of Matplotlib for Arabic-speaking users in scientific, academic, and educational contexts.


Proposed Solution

To resolve this issue, we propose the following enhancements:

  1. Integrate Arabic reshaping and bidi support:

  2. Support Arabic-compatible fonts such as:

    • Amiri
    • Noto Naskh Arabic
    • Lateef
    • Cairo
  3. Auto-detect Arabic text and apply shaping + direction correction internally (if feasible).


Visual Example

The following image shows a real example of the issue where Arabic text is rendered incorrectly in a plot:

(please see attached image or PDF)


Attached PDF Report

A full report is attached with:

  • Bilingual description (Arabic + English)
  • Proposed technical solution
  • Plot illustration of the current rendering issue

Environment

  • Matplotlib version: [please fill]
  • Python version: [please fill]
  • OS: [please fill]

Thank you for your efforts and for supporting internationalization!

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions