Skip to content
Advertisement

Tag: matplotlib

Sort categorical x-axis in a seaborn scatter plot

I am trying to plot the top 30 percent values in a data frame using a seaborn scatter plot as shown below. The reproducible code for the same plot: Here, I want sort the x-axis in order = [‘virginica’,’setosa’,’versicolor’]. When I tried to use order as one of the parameter in sns.scatterplot(), it returned an error AttributeError: ‘PathCollection’ object has

Reproducing a 2d histogram in Python

I’m working with a very large dataset in Python, so I’m trying to use histograms instead of arrays (the arrays get way too large for saving/loading/mapping). I’m crawling over a bunch of files and pulling information from them, and I would like to then take the information and remake the histograms afterwards. I can do this with a 1D histogram

How subplot pairs of photo from different folder

I have 2 folder each has 13 pics. I wanna plot any pair of them. for example the first pic from the first folder next to the first pic in the second folder. and then below it the second pair of photose from the first and second folder. could you please help me. I tried my self but id doesn’t

Python, Error while installing matplotlib

OS: Windows 10 Python ver: 3.9.0 Error code: I tried: didn’t work. and then I tried: didn’t solve the problem. I read on SO that maybe if I open the shell in administrator mode it could solve the problem but it didn’t work too. I saw someone mentioning ez-setup for this error code. I installed it but that didn’t work

How to plot figures to different subplot axes in matplotlib

I was trying to plot a figure with a combination of a 3d subplot and 3 2d ones. Why do they overlap each other? Here are my codes: Answer In each group, an ax is created with ax = fig.add_subplot(3, 2, 1, projection=’3d’), but then you reassign the variable with ax = plt.axes(projection=’3d’); this does not plot to ax. To

Matplotlib 3d scatter _facecolors3d not working

I am trying to save a 3d scatter plot animation where points appear one at a time. I made the animation work, but when I set the face colors of the points they do not take effect and all points appear blue. When I use the same color array but on static image, colors work well. Animation Code: When I

Advertisement