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 - Or et splendeur royale

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.4.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.4.0-py3-none-any.whl (344.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: frenchplotlib-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 c99ca00a8bf9b7c2dce0011035a629d597d93faf4bb9e9a5d046bef7f08bb498
MD5 5592d5baa71e19232450b4e8fcbfc162
BLAKE2b-256 15ebe7bc8db21f033a18f0132fb6a9886f87c53d9105dc62aea6597a38efc4fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: frenchplotlib-0.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd5d4b491f09e276dadec7cc793a3fdb1529d90f22e420f992ab455891700d2
MD5 24c748e6c0b3dbdfc24f3ac7bf535ca7
BLAKE2b-256 931729d11927d0e1e63dab93590bea7883b21d6fb6441be2672bea40d8fa36f7

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