72,723 questions
Score of -8
0 answers
126 views
Matplotlib Histogram - Threshold where all values above it show accumulated in a single bar [closed]
I'm currently constructing histograms for some data and was asked to make it so that, beyond a certain threshold it accumulates all occurrences in a single bar.
Currently my graphs look like this:
I ...
Score of 0
0 answers
60 views
matplot patchcollection(s) moving and rotating, all together and each seprately, what is best?
what is best practice, professional software program to user can move rotate all patchcollection together/ each seprately? to fit patch(s) to ROI get array data from an image? any tiny advice is ...
Score of 3
1 answer
126 views
Adding columns in matplotlib graph breaks row layout
I want to make a graph with 3 mains rows, all divided into 2 sub-rows, themselves divided in columns. Main rows have to be separated by a larger space than sub-rows, in order for a title to be added. ...
Score of 1
0 answers
104 views
Matplotlib live plot freezes when in a Bleak asyncio loop
I am receiving data over BLE using the bleak library. When I receive a sensor reading I am trying to plot it using matplotlib
The first data point gets read & printed to the console, the ...
Score of -1
3 answers
175 views
How to plot specific data types in matplotlib
I want to plot variables against timedate but I want different graphs for different types of data. For example N2O_flux against time but the the graphs only shows data point of fertilizer LowN.
This ...
Score of 3
2 answers
148 views
matplotlib savefig silently exits with code 1 after plt.plot() succeeds — no exception, no output
I am running Python 3.13.14 on Windows 11, using VS Code 1.100.3 with the ms-python extension, inside a conda environment managed by Miniforge3. matplotlib version is 3.11.1, PyQt5 (pyqt 5.15.11) is ...
Score of 3
1 answer
150 views
How to draw a radial axis in polar coordinate with matplotlib?
I am using ax.pcolor() to create a plot in polar coordinates, and I would like to add a radial axis-like line at a fixed angle (e.g., 250 degrees).
Specifically, I would like the axis-like line to:
...
Score of 2
2 answers
316 views
Trying to Change A Pixel in Python
I'm trying to change a pixel to red. However, when I run the code, the pixel remains unedited. Can you help?
import cv2 as cv
import os
import matplotlib.pyplot as plt
def readAndWriteImage():
...
Score of 9
1 answer
970 views
Conway's Game of Life: How can we colour the cells based on number of neighbours? (change number of neighbours to age of cells)
I've coded Conway's Game of Life in NumPy and Matplotlib.
It works, but I want to alter the colours of the cells based on their numbers of neighbours. My code does set background colour and cell ...
Score of 4
2 answers
202 views
How can I boxplot values that wrap around using matplotlib?
I want to show the distribution of angle estimations using a boxplot. The problem is that angles wrap around (I chose +-180° as the wrapping point, but the same applies to 0/360°).
Matplotlibs boxplot ...
Score of -2
0 answers
169 views
How do I plot this function for all values of the numpy array?
I want some straightforward way to model a for all values of the array like in a for loop. the only way I found was using filtered arrays which is very very tedious.
This function takes a number turns ...
Score of 2
1 answer
130 views
Plot grid shifted against data points
I have defined a plotting method (in a class, where self.steps is a list of lists of dictionaries, containing different "feature": value associations. Also self.path_alignments here is a ...
Score of 0
1 answer
112 views
Data Labels on Matplotlib and Saving graph to a pptx
I was creating visuals/graph using matplotlib. So far, I need to create a data labels with the follow data sample.
cellvalue1 = [1,2,3,4,5,6,7,8,9,10,11,12,13]
cellvalue2 = [1,2,3]
fig, ax = plt....
Score of 0
1 answer
130 views
What Python packages/libs are your favorite for automating prod level report building (graphs, charts)
I realize this is a broad question and will depend case by case. Really just looking to explore new Python libraries and pandas since there are so many out there! My main tasks involve moving data ...
Score of 0
3 answers
232 views
Very high uncertainty in a parameter using curve_fit() on exponential relation
Plots of different graphs fitted using the same function
I tried fitting my plots, which are supposed to show a negative exponential using the same function, but predictions for L_infty are really ...