Category "matplotlib"

How to write combinations of English words and Greek letters in matplotlib?

import matplotlib.pyplot as plt import numpy as np x = np.array([tau for tau in range(365)]) y = np.random.normal(0,1, 365) plt.plot(x,y) plt.xlabel(r"$\tau$")

Changing axis label size in Seaborn catplot [duplicate]

I am trying to enlarge the x-axis labels (that is 'onshore', 'offshore', and 'solar'), along with rotating them. But whenever I increase the s

ValueError: hist method requires numerical columns, nothing to plot

I was going through a tutorial, but as I was running the code in an IDE, an error occurred. The link to the tutorial is here: https://thecleverprogrammer.com/20

matplotlib savefig of multiple subplots without displaying

I have an array of images which I have reshaped as size (28, 28, 3) of 100 images. I want to save the plot which the below code generates, but without display

Removing axis labels matplotlib

I have this image and I don't know how to remove the axis labels from the top and right hand side. I have tried: ax.spines['right'].set_visible(False) ax.s

Is there a way to show multiple continously moving dots on a 2D graph?

For my master thesis i am researching dqn behaviour by recreating a hunter and prey enviroment. This enviroment is 2D and should fit around 1000 dots that are c

How to add data labels to seaborn barplot? [duplicate]

I have the following code to produce a bar plot in seaborn import pandas as pd import matplotlib.pyplot as plt import seaborn as sns df = pd

Drawing zone over plt.imshow

I'm plotting some .tiff images using GDAL and matplotlib. Currently images look like the one in the example and I would like to mark a zone over the image.I hav

Input contains NaN, infinity or a value too large for dtype('float64') but i've manually changed Nan values in my database to equal 0

I've been having trouble with my regression formula. my dataset hasn't got any Nan values as I went through my database and replaced any blank cells with the va

Input contains NaN, infinity or a value too large for dtype('float64') but i've manually changed Nan values in my database to equal 0

I've been having trouble with my regression formula. my dataset hasn't got any Nan values as I went through my database and replaced any blank cells with the va

Pandas subplot date ticks appear unevenly spaced with irregular time series

I created this example after seeing the issue multiple times. This helped me realize that the problem comes when plotting the time series of a data frame with i

How to line plot timeseries data on a bar plot

I have the following data frame: data = {'date': ['3/24/2020', '3/25/2020', '3/26/2020', '3/27/2020'], 'Total1': [133731.9147, 141071.6383, -64629.74024

Minimum value of plt.pause()

I'm using matplotlib's pause function. https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.pause.html What is the range of the value which is acceptable

How can I draw a line in a python plot indicating 1 standard deviation?

I have a plot from a data frame, I want to to draw a line indicating one standard deviation from the mean like in the picture below. I know how to add text in

Matplotlib Qt5Agg backend not found

I have written a Python 3.6 program that reads a .txt file of UTM coordinates, sorts them into counterclockwise order, displays the coordinates on a graph using

Plotting Trajectories of 1-D and 2-D Dynamical Systems in Python

I would like to know how I can plot the trajectories of Dynamical Systems using Python as shown below. Most of the examples I have come across that use Python d

Plot the Decision Boundary of a Neural Network in PyTorch

I've been trying to plot the decision boundary of my neural network which I used for binary classification with the sigmoid function in the output layer but wit

Change the color of inner circle in the polar plot in matplotlib

I am making a polar plot and this is the output of my code Everything is working fine, I just need to know how can I change the edgecolor of the inner-most cir

Why is Shapely plotting two lines when I change a coordinate?

I'm trying to understand how Shapely works. I can draw a simple line with the following code: import matplotlib.pyplot as plt A = Point(0,0) B = Point(1,1)

Python single plot in a for loop without creating a list or array

This may sound like a very naive question. However, to me, it's quite fundamental: Can python plot variables without putting them into arrays or lists? I couldn