Category "matplotlib"

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

Find and draw regression plane to a set of points

I want to fit a plane to some data points and draw it. My current code is this: import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.py

Ubuntu running `pip install` gives error 'The following required packages can not be built: * freetype'

When performing pip install -r requirements.txt, I get the following error during the stage where it is installing matplotlib: REQUIRED DEPENDENCIES AND EXTENS

How to prevent the opening of new windows with figures?

When I run a Python script which creates and saves a matplotlib figure, the figure is shown in a new PyCharm window (even if there is no plt.show() in my code).

Seaborn Pariplot: how to move legend and set style

I'm trying to get a pairplot of my data using seaborn. I want to set the legend outside of the axes because my other plots might have upto 9 features which make

How to fix 'numpy.ndarray' object has no attribute 'get_figure' when plotting subplots

I have written the following code to plot 6 pie charts in different subplots, but I get an error. This code works correctly if I use it to plot only 2 charts, b

Is there a way to iteratively add plots to Animation.FuncAnimation()?

I'm working on my master thesis right now and need to animate a high number of points moving. Those points will be representing predators and prey. The number o