Category "matplotlib"

How to plot a streamplot in python for a streamline flow arround a cylinder?

I have written a program where it takes a radius range(R to 5) and theta range(0 to 2pi). It converts the polar coordinates to Cartesian coordinates. Then I hav

Cartopy issue with extent (free(): invalid size)

I'm using Cartopy and I struggle with this issue free(): invalid size. It occurs when I set the map extent. extents = [-13, 44, 34, 63] # Europe proj = cartopy.

Contour plots for multivariate gaussian

I'm trying to use a contour plot to visualize a multivariate normal distribution. import numpy as np from scipy.stats import multivariate_normal mean = (0, 0)

Import Error: cannot import name 'ft2font' from partially initialized module 'matplotlib'

import matplotlib.pyplot as plt output ImportError Traceback (most recent call last) <ipython-input-7-a0d2faabd9e9> in <

plotting with subplots in a loop

z = {'A': [0.3618426, 0.36146951], 'B': [1.8908799, 1.904695], 'C': [2.1813462e+08, 2.1833622e+08], 'D': [0.89925492, 0.89953589], 'E': [2.6356747, 2.6317911],

Share Y axis in Matplotlib with different ticks and labels

I want to plot 2 adjacent figures sharing the y axis but I want to specify different ticks and labels to the left of the left figure and to the right of the rig

Python3 AttributeError: module 'signal' has no attribute 'getsignal'

Trying to import matplotlib for Python 3.8.2 with from matplotlib import pyplot as plt I am using matplotlib version 3.2.2 Traceback (most recent call last):

Categorize and order bar chart by Hue

I have a problem. I want to show the two highest countries of each category. But unfortunately I only get the below output. However, I would like the part to be

Same x-ticks for all subplots in matplotlib

Though this question has already been asked, but I am unable to implement that. I don't know how get the xticks for each subplot and then replace it with the ne

Same x-ticks for all subplots in matplotlib

Though this question has already been asked, but I am unable to implement that. I don't know how get the xticks for each subplot and then replace it with the ne

Error22 with plt.savefig() [closed]

I'm trying to save a jpg in one of my files but I revice error 22 all the time. This is my code: buy_dir = r'‪C:/Users/Erik/Downloads/b

How to show xticks for all 365 distinct tick labels on the X-axis using matplotlib?

I have plotted two line plots. For Y-axis as the number of values are less, the Y-axis is clearly visible. However, for X-axis there are 365 values correspondin

matplotlib: values for the (xx-small, x-small, small, medium, large, x-large, xx-large, larger, smaller) special sizes

The matplotlibrc sample file states that: ## The font.size property is the default font size for text, given in pts. ## 10 pt is the standard value. ## ## Note

Use pymodis.voncertmodis.crateMosaic for daily Modisimage

I'm want to build a code, which make every day a mosaic image. I started like this: import pymodis from pymodis import convertmodis_gdal import glob #MOD09GA.

Matplotlib graph with multiple y axis shows and doesn't save

I am plotting a graph with 3 y axis, and it shows in the plot window of Spyder instead of saving correctly in a folder. The graph saved in a folder is blank. He

Python mouse event for selecting multiple points on a graph

I am trying to select multiple points on a graph and move them. Right now I just have the singular mouse click event where I can click one point and move it, bu

How does one insert statistical annotations (e.g. p-values) into a seaborn figure-level plot (e.g. catplot)?

Goal: Given a seaborn catplot (kind="bar") with multiple rows, grouped bars, and a mapped stripplot, how do I add statistical annotations (p-values). The follow

Make Seaborn Distplot and Barplot the same color [duplicate]

I have been unable to figure out how to set the colors between distplot and barplot to be the same. Despite setting the color argument in both

4D plot surface does'nt display the colors of my 4th dimension

I've been trying de plot 4D figures of aerosols emissions in the atmosphere with X = Longitude, Y = latitude, Z = Injection Heigh of aerosols and cbar = Emissio

matplotlib "fail to allocate bitmap" after some iterations

I can't find a solution to avoid this crash. I have cleaned up the attached code because it contains the issue and nothing else. Regardless of the size of the i