Category "matplotlib"

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

Function for subplots for real time plotting

I have a code which gives me 4 individual live plotting graphs for 4 different sensors. But, I want them in a single frame using subplots. Pasting 2 pieces of c

Geopandas not plotting correct colors

My Geopandas DataFrame has 3 polygons and 9 points with color_rgba column computed with matplotlib.colors.to_rgba function: import contextily as ctx import geop

how to set plt.xlimit with date and time

I can only set the x axis limit to a certain date, but not with hours, minutes seconds. My code looks like this: plt.figure() plt.plot(data.date,sig,'b-') plt.x

Tkinter DPI bug depends on how import is entered?

I have a weird question. In essence: why does the way I enter the pyplot import line into iPython influence my plot?! Try this (on Windows 10): Use a high-DPI m

Shap value plotting error on Databricks but works locally

I want to do a simple shap analysis and plot a shap.force_plot. I noticed that it works without any issues locally in a .ipynb file, but fails on Databricks wit

How to set space between the axis and the label in matplotlib

My code: #importing required libraries import numpy as np from matplotlib.patches import Polygon import matplotlib.pyplot as plt #plotting data def func(x):

Shap - The color bar is not displayed in the summary plot

When displaying summary_plot, the color bar does not show. shap.summary_plot(shap_values, X_train) I have tried changing plot_size. When the plot is higher th

Visualize Tensor [1,64,112,112] using matplotlib

I have a output tensor after convolution of dimensions [1,64,112,112]. Is there any way I can visualize this using matplotlib only, keeping in mind that imshow(