---
title: "Python : test de la librairie calplot"
url: https://www.cyber-neurones.org/2024/12/python-test-de-la-librairie-calplot/
date: 2024-12-09
modified: 2024-12-09
author: "Frederic"
description: "Le plus longs c'est de fixer les problèmes Python ... findfont: Font family 'Helvetica' not found. Ensuite quelques lignes de code : import pandas as pd import calplot import pylab..."
categories:
  - "Dev"
tags:
  - "Python"
word_count: 60
---

# Python : test de la librairie calplot

Le plus longs c'est de fixer les problèmes Python ...

findfont: Font family 'Helvetica' not found.

Ensuite quelques lignes de code :

import pandas as pd
import calplot
import pylab
from matplotlib import rcParams

df_tem = pd.read_csv('./VeloResume2020-2024-v4.csv', delimiter=";")
df_tem2 = df_tem.groupby([df_tem['date'].dt.date,'activity'])['km'].sum().reset_index().rename(columns={'sum':'km'})
df_tem2 = df_tem2.query('activity=="E-Biking"'
fig = calplot.calplot(df_tem2['km'],
cmap="BuGn",
fillcolor="w",
linecolor="w",
suptitle_kws=csfont,
yearlabel_kws={'fontname':'sans-serif'},
fig_kws=dict(facecolor="w"),
subplot_kws=dict(facecolor="w"),
edgecolor="grey")
pylab.savefig('E-Biking.png')

[![](https://www.cyber-neurones.org/wp-content/uploads/2024/12/mountain-biking-300x204.png)](https://www.cyber-neurones.org/2024/12/python-test-de-la-librairie-calplot/mountain-biking/)

VTT

[![](https://www.cyber-neurones.org/wp-content/uploads/2024/12/gravel-biking-300x204.png)](https://www.cyber-neurones.org/2024/12/python-test-de-la-librairie-calplot/gravel-biking/)

Gravel

[![](https://www.cyber-neurones.org/wp-content/uploads/2024/12/biking-300x204.png)](https://www.cyber-neurones.org/2024/12/python-test-de-la-librairie-calplot/biking/)

Velo

[![](https://www.cyber-neurones.org/wp-content/uploads/2024/12/e-biking-300x204.png)](https://www.cyber-neurones.org/2024/12/python-test-de-la-librairie-calplot/e-biking/)

E-Bike