Skip to main content

French-themed matplotlib markers and colormaps

Project description

🥖 frenchplotlib

Une bibliothèque Python pour ajouter une touche française à vos visualisations matplotlib avec des marqueurs personnalisés et des palettes de couleurs inspirées de la France.

📝 Description

frenchplotlib enrichit vos graphiques matplotlib avec :

  • 🥐 17 marqueurs personnalisés en forme d'icônes françaises (baguette, croissant, vin, fromage, etc.)
  • 🎨 16 palettes de couleurs inspirées de la culture française (tricolore, lavande de Provence, Bordeaux, etc.)

🚀 Installation

pip install frenchplotlib

📦 Prérequis

  • Python >= 3.6
  • matplotlib
  • numpy

💡 Utilisation

Marqueurs personnalisés

import matplotlib.pyplot as plt
import numpy as np
from frenchplotlib import baguetteplot

# Données d'exemple
x = np.linspace(-1, 1, 20)
y = np.sin(x)

# Utilisation d'un marqueur en forme de boule de pain
plt.figure(figsize=(10, 6))
plt.scatter(x, y, marker=baguetteplot.boule, s=500)
plt.title("Graphique avec marqueur français")
plt.show()

Palettes de couleurs

import matplotlib.pyplot as plt
import numpy as np
from frenchplotlib import baguetteplot, dorures

# Données d'exemple
x = np.linspace(-1, 1, 20)
y = np.sin(x)

# Combinaison marqueur + palette de couleurs
plt.figure(figsize=(12, 6))
plt.scatter(x, y, c=y, marker=baguetteplot.boule, s=1000, cmap=dorures.escargot_persil)
plt.colorbar(label='Valeurs')
plt.title("Visualisation à la française")
plt.show()

🥐 Marqueurs disponibles (baguetteplot)

  • baguette - Une baguette traditionnelle
  • pain_de_mie - Pain de mie
  • croissant - Croissant doré
  • pain_au_chocolat - Pain au chocolat (ou chocolatine 😉)
  • boule - Boule de pain
  • brioche - Brioche dorée
  • bretzel - Bretzel alsacien
  • fougasse - Fougasse provençale
  • pita - Pain pita
  • vin - Verre de vin
  • fromage - Morceau de fromage
  • eclair - Éclair au chocolat
  • macaron - Macaron parisien
  • camembert - Camembert de Normandie
  • madeleine - Madeleine de Proust
  • religieuse - Religieuse au chocolat
  • escargot - Escargot de Bourgogne

🎨 Palettes de couleurs (dorures)

Palettes gourmandes

  • pain_dore - Du blanc crème au brun doré
  • baguette_bien_cuite - Dégradé de cuisson parfaite
  • croissant_beurre - Or brillant et miel
  • fromage - Palette des fromages français
  • macaron - Couleurs pastel gourmandes

Palettes régionales

  • tricolore - Drapeau français (bleu, blanc, rouge)
  • lavande - Lavande de Provence
  • cote_azur - Mer et ciel méditerranéens
  • bourgogne - Couleurs d'automne bourguignonnes
  • versailles - Or et splendeur royale
  • nuit_parisienne - Bleu nuit et lumières dorées

Palettes viticoles

  • bordeaux - Du rosé au rouge profond
  • champagne - Pétillant et doré

Palettes spéciales

  • escargot_persil - Marron gris-vert
  • french_kiss - Rouge passionnel
  • je_m_en_fous - Gris perle élégant

📊 Exemples avancés

Graphique multi-marqueurs

import matplotlib.pyplot as plt
import numpy as np
from frenchplotlib import baguetteplot, dorures

fig, ax = plt.subplots(figsize=(12, 8))

# Différents marqueurs
marqueurs = [baguetteplot.croissant, baguetteplot.vin, baguetteplot.fromage, baguetteplot.macaron]
couleurs = ['#FFD700', '#8B0000', '#F5DEB3', '#FFB6C1']
labels = ['Croissant', 'Vin', 'Fromage', 'Macaron']

for i, (marker, color, label) in enumerate(zip(marqueurs, couleurs, labels)):
    x = np.random.randn(10) + i*2
    y = np.random.randn(10) + i
    ax.scatter(x, y, marker=marker, s=800, c=color, label=label, alpha=0.7)

ax.legend(loc='best')
ax.set_title('Les délices de France', fontsize=16)
plt.show()

Heatmap avec palette française

import matplotlib.pyplot as plt
import numpy as np
from frenchplotlib import dorures

# Données aléatoires
data = np.random.rand(10, 10)

plt.figure(figsize=(10, 8))
plt.imshow(data, cmap=dorures.tricolore, aspect='auto')
plt.colorbar(label='Intensité')
plt.title('Heatmap tricolore')
plt.show()

🛠️ Développement

Installation en mode développement

git clone https://github.com/PhilZPhaZ/frenchplotlib.git
cd frenchplotlib
pip install -e .

Structure du projet

frenchplotlib/
├── frenchplotlib/
│   ├── __init__.py
│   ├── baguetteplot.py    # Marqueurs personnalisés
│   └── dorures.py          # Palettes de couleurs
├── main.py                 # Exemple d'utilisation
├── setup.py
├── pyproject.toml
└── README.md

📄 Licence

Ce projet est sous licence MIT.

🤝 Contribution

Les contributions sont les bienvenues ! N'hésitez pas à :

  • Signaler des bugs
  • Proposer de nouvelles fonctionnalités
  • Ajouter de nouveaux marqueurs ou palettes
  • Améliorer la documentation

🙏 Remerciements

Merci à matplotlib pour son excellente bibliothèque de visualisation qui rend tout cela possible.


Créé avec ❤️ et 🥖 en France

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frenchplotlib-0.5.0.tar.gz (326.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

frenchplotlib-0.5.0-py3-none-any.whl (344.5 kB view details)

Uploaded Python 3

File details

Details for the file frenchplotlib-0.5.0.tar.gz.

File metadata

  • Download URL: frenchplotlib-0.5.0.tar.gz
  • Upload date:
  • Size: 326.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for frenchplotlib-0.5.0.tar.gz
Algorithm Hash digest
SHA256 860c4ec4dcc0468f13b6a4b7e5ac45f41eef6846d9c1507fcee622cfe1bc2f21
MD5 60c4386d64158c6733f7aeda41630570
BLAKE2b-256 980f6022da708ff1ee864365c10a6ddc8af060192dcd8034d9b75f3a109fe766

See more details on using hashes here.

File details

Details for the file frenchplotlib-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: frenchplotlib-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 344.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for frenchplotlib-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30052fef3d5fe61e4d9bfbd1457e13d90d747b2bf08145d57990260f2f0c0cc8
MD5 3fb773c1fd21669f992ee0dfc98adb0f
BLAKE2b-256 07f6b1a8e51d395e1b695e02405fcf8ca41c6b93a36c824c39b06ab35c4886fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page