Category "matplotlib"

Using `matplotlib` to plot - <Figure size 432x288 with 0 Axes>

I've a huge data set with 158 columns and 3.1 million rows. I'm trying to plot univariate distibutions for that data set. Code is as given below. dtf = pd.read_

python animation.FuncAnimation error : object is not iterable

I'm new to Python and now studying matplotlib to use animation function. I'm following qutip tutorial because of my study. But when I copied and pasted example

Matplotlib not saving axes on savfig

This code only saves this image. As you can see it's rather empty :| Where are my axes plots? start = 100 sim_rets = gbm( mu=m.mu, n_scenarios=m.scenari

Row and column headers in matplotlib's subplots

What's the best practise to add a row and a column header to a grid of subplots generated in a loop in matplotlib? I can think of a couple, but not particularly

Setting plot background colour in Seaborn

I am using Seaborn to plot some data in Pandas. I am making some very large plots (factorplots). To see them, I am using some visualisation facilities at my u

Setting plot background colour in Seaborn

I am using Seaborn to plot some data in Pandas. I am making some very large plots (factorplots). To see them, I am using some visualisation facilities at my u

Time series dBFS plot output modification - current output plot not as expected (matplotlib)

I'm trying to plot the Amplitude (dBFS) vs. Time (s) plot of an audio (.wav) file using matplotlib. I managed to do that with the following code: def convert_to

How do I change the backend in CoCalc to show a matplotlib scatter graph?

I have a program that is working fine locally, but I need to use it in CoCalc on the cloud to share with a group. Everything works fine until the end, when I wa

Scientific tick label notation tuning

I am not completely satisfied with the default scientific formatting for the tick labels. For example, import numpy as np import pylab pylab.rcParams['text.us

Uneven coordinates in astropy Cutout2D image plot

I am using astropy to download and plot images from the SDSS database. Also I am using the Cutout2D function to cut a 10x10 arcsec square around the object I am

How to add custom annotations to a stacked bar

I am trying to annotate a stacked histogram in Seaborn with the hue for each segment in the histogram for readability reasons. I've attached sample data below a

PyQt GUI size on high resolution screens

I posted a question a while ago asking about Tkinter backends and subsequently forgot about it but I've since realised that I'm using the pyqt backend. Is there

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' on matplotlib import

I'm trying to run a simple testfile on a remote Server. But it throws a numpy error for matplotlib.pyplot. Here is the code import matplotlib.pyplot as plt impo

How tracking curve parameter changes via the toolbar?

I have a GUI application written in qt (pyside2) that has realtime plotting using matplotlib. Is there any way to track changes in curve parameters via matplotl

How can I plot separate Pandas DataFrames as subplots?

I have a few Pandas DataFrames sharing the same value scale, but having different columns and indices. When invoking df.plot(), I get separate plot images. what

Converting an image from Cartesian to Polar - Limb Darkening

import numpy as np import cv2 from matplotlib import pyplot as plt img = cv2.imread('C:\\Users\\not my user name\\Desktop\\20140505_124500_4096_HMIIC.jpg', 0)

Python & Matplotlib: Make 3D plot interactive in Jupyter Notebook

I use Jupyter Notebook to make analysis of datasets. There are a lot of plots in the notebook, and some of them are 3d plots. I'm wondering if it is possible t

how to rotate a 3D surface in matplotlib

I have written code to plot a 3D surface of a parabaloid in matplotlib. How would I rotate the figure so that the figure remains in place (i.e. no vertical or

pip install matplotlib does not work under termux (Android)

I installed termux on my Android tablet, and was able to successfully install Python 3.9 and Numpy, but not matplotlib. Apparently the .whl was downloaded and

Problems while plotting time series against user logins?

I have a large pandas dataframe, which is a log of user ids that login in a website: id datetime 130 2018-05-17 19:46:18 133 2018-05-17 20:5