Skip to content

Commit

Permalink
MNT: fix matplotlib deprecation in example
Browse files Browse the repository at this point in the history
  • Loading branch information
theOehrly committed Jan 1, 2024
1 parent 92aa85f commit 41075e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/plot_gear_shifts_on_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
from matplotlib import cm
from matplotlib import colormaps
import numpy as np


Expand All @@ -37,7 +37,7 @@
# Create a line collection. Set a segmented colormap and normalize the plot
# to full integer values of the colormap

cmap = cm.get_cmap('Paired')
cmap = colormaps['Paired']
lc_comp = LineCollection(segments, norm=plt.Normalize(1, cmap.N+1), cmap=cmap)
lc_comp.set_array(gear)
lc_comp.set_linewidth(4)
Expand Down

0 comments on commit 41075e2

Please sign in to comment.