Top "Matplotlib" questions

Matplotlib is a plotting library for Python which may be used interactively or embedded in stand-alone GUIs.

Matplotlib 2 Subplots, 1 Colorbar

I've spent entirely too long researching how to get two subplots to share the same y-axis with a single colorbar …

python matplotlib subplot colorbar
How to plot ROC curve in Python

I am trying to plot a ROC curve to evaluate the accuracy of a prediction model I developed in Python …

python matplotlib plot statistics roc
Why do many examples use `fig, ax = plt.subplots()` in Matplotlib/pyplot/python

I'm learning to use matplotlib by studying examples, and a lot of examples seem to include a line like the …

python matplotlib plot visualization
Seaborn plots not showing up

I'm sure I'm forgetting something very simple, but I cannot get certain plots to work with Seaborn. If I do: …

python matplotlib seaborn
Python xticks in subplots

If I plot a single imshow plot I can use fig, ax = plt.subplots() ax.imshow(data) plt.xticks( [4, 14, 24], [5, 15, 25] ) to …

python matplotlib imshow
How can I set the aspect ratio in matplotlib?

I'm trying to make a square plot (using imshow), i.e. aspect ratio of 1:1, but I can't. None of these …

python matplotlib
'invalid value encountered in double_scalars' warning, possibly numpy

As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate …

python numpy warnings matplotlib
How to overplot a line on a scatter plot in python?

I have two vectors of data and I've put them into pyplot.scatter(). Now I'd like to over plot a …

python numpy matplotlib linear-regression scatter-plot
How to add title to seaborn boxplot

Seems pretty Googleable but haven't been able to find something online that works. I've tried both sns.boxplot('Day', 'Count', …

pandas matplotlib seaborn
How can I plot a confusion matrix?

I am using scikit-learn for classification of text documents(22000) to 100 classes. I use scikit-learn's confusion matrix method for computing the …

python matplotlib matrix scikit-learn text-classification