Category "matplotlib"

conda install matplotlib results in huge list on incompatibilities

I have a conda env that I build from a requirements.yml file that I obtained from a classmate so we could work on a project together. I tried installing matplot

Plotting all of a trigonometric function (x^2 + y^2 == 1) with matplotlib and python

As an exercise in learning Matplotlib and improving my math/coding I decided to try and plot a trigonometric function (x squared plus y squared equals one). Tr

How to plot a figure with Chinese Characters in label

When I draw a figure with Chinese Character label in Python 3, it doesn't work correctly: ] My code: fig = pd.DataFrame({ '债券收௡

Change the facecolor of boxplot in pandas

I need to change the colors of the boxplot drawn using pandas utility function. I can change most properties using the color argument but can't figure out how t

'Cursors' object has no attribute 'RESIZE_HORIZONTAL' in qt bindings with %matplotlib qt

That is what appears when I run %matplotlib qt. Along with this error message, I tried widget which gave me the same answer (+ try to use qt). PyQt5 is imported

Python: How to plot heat map of 2D matrix by ignoring zeros?

I have a matrix of size 500 X 28000, which contains a lot of zeros in between. But let us consider a working example with the matrix A: A = [[0, 0, 0, 1, 0],

Calculating Matplotlib Text Rotation [duplicate]

I'm trying to figure out how to rotate text in matplotlib to align to a curve in a plot, but I haven't figured what transformations give the p

pyplot bar charts with individual data points

I have data from a control and treatment group. Is matplotlib able to create a bar chart where the bar height is the mean of each group overlaid with the indivi

Suppress scientific notation in sklearn.metrics.plot_confusion_matrix

I was trying to plot a confusion matrix nicely, so I followed scikit-learn's newer version 0.22's in built plot confusion matrix function. However, one value of

How to remove N and E symbol in Cartopy lat-lon gridliner ticks

I am trying to remove capital N and E symbols in Cartopy gridline tick-labels. Just I want to keep the numeric value with degree symbol(°), e.g., 10°,15

Matplotlib - How to remove color bar but keep the heatmap position unchanged

I made a figure with 3 axes in it. Each axis is a heatmap with the same color bar. I want to only keep the colorbar of the 3rd axis and hide the 1st and 2nd col

Matplotlib: Adding axhline to subplot within Figure object

I need to find a way how to reference axes within matplotlib.figure.Figure object in order to add axhline(s) to one of the plots. I am using a plot_joint from t

Get data points from Seaborn distplot

I use sns.distplot to plot a univariate distribution of observations. Still, I need not only the chart, but also the data points. How do I get the data poi

Scatter plot form dataframe with index on x-axis

I've got pandas DataFrame, df, with index named date and the columns columnA, columnB and columnC I am trying to scatter plot index on a x-axis and columnA on

plotting data from a list in python

I need to plot the velocities of some objects(cars). Each velocity are being calculated through a routine and written in a file, roughly through this ( I have

How to avoid overlapping when there's hundreds of nodes in networkx?

I've got 2000+ nodes and 900+ edges, but when I was trying to make graphics in networkx, I found all the nodes crowded together. I tried changing attribute valu

How to detect if a twin axis has been generated for a matplotlib axis

How can one detect if an axis has a twin axis written on top of it? For example, if given ax below, how can I discover that ax2 exists? import matplotlib.pyplo

Is it possible to both save and show matplotlib animation without running each frame twice?

It is possible to save, and then show, a matplotlib animation, but it takes twice as long as it could, in all examples that I have found. I wonder if the same t

Matplotlib and Pandas Plotting amount of numbers in certain range

I have pandas Dataframe that looks like this: I am asking to create this kind of plot for every year [1...10] with the Score range of [1...10]. This means that

Why can I not run matplotlib on Python 3.10?

My Issue. I am trying to run matplotlib on python 3.10 on my MacOS, but I get the following error: ModuleNotFoundError: No module named 'matplotlib' However, w