Skip to main content

All Questions

Tagged with
1 vote
2 answers
27 views

sharex and imshow do not produce plots of the same width

Context: I have the x,y and x,z projection of an image. I want the two images to be stacked vertically sharing the same width. My trial: I tried the following: import numpy as np import matplotlib....
Antonio Ragagnin's user avatar
-1 votes
0 answers
25 views

A problem with Importing Matplotlib (A module that was compiled using NumPy 1.x) [duplicate]

When I'm trying to import matplotlib by the following standard code: import matplotlib.pyplot as plt I'm getting the following error massage: A module that was compiled using NumPy 1.x cannot be run ...
Elad's user avatar
  • 19
0 votes
1 answer
33 views

Computing and Visualizing Linear Trends in Ocean Temperature Data

I have a dataset containing ocean temperature values for the time period 1950-2022, covering the entire globe. My goal is to calculate the linear trend for each surface grid box and visualize the ...
faeze bh's user avatar
0 votes
1 answer
59 views

Plot a path in a very large 2D matrix using Matplotlib

I want to plot a path in a very large (e.g. 500K x 500K) 2D matrix. My current approach is creating an uint8 np array (for space-saving reasons, as I only have 4 possible values) and plotting it with ...
Quim's user avatar
  • 21
0 votes
2 answers
89 views

Plotting a chirp square signal in python

Wikipedia definition: A chirp is a signal in which the frequency increases (up-chirp) or decreases (down-chirp) with time. In some sources, the term chirp is used interchangeably with sweep signal. I ...
DrCoolZic's user avatar
0 votes
1 answer
50 views

Three array scatter plot using Numpy and Matplotlib

import matplotlib.pyplot as plt x =[24,73,94,8,26,80,89,23,7,50] y =[52,98,48,39,50,84,76,96,76,9] z=[14,56,79,21,42,67,5,55,27,91,10] plt.scatter(x, y,z) # To show the plot plt.show() I ...
KAVSHEKAA V CSBS's user avatar
0 votes
1 answer
39 views

Average of Sampled Data at Different Sampling Points

I need to plot the average of different trails of my sampled data y. The difficult part is that the corresponding sample points x do not coincide. However, x can only range from 0 to 1. The following ...
Isotope's user avatar
  • 143
0 votes
0 answers
41 views

Does the Intensity of color in OpenCV image matter?

Here is a simple code which puts a text value onto a black frame and displays it: frame = np.zeros((50,200,3)) org=(0,45) font=cv2.FONT_HERSHEY_SIMPLEX fontScale=1 fontColor=(1,0,0) ##rgb out_img =...
Allohvk's user avatar
  • 1,161
1 vote
0 answers
90 views

Trying to use Matplotlib, but it doesn't work even with downgraded Numpy version

I'm trying to import Matplotlib, but I keep getting import error with the following message: If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to ...
wanderer 's user avatar
0 votes
0 answers
54 views

Unexpected horizontal line in discrete inverse Fourier transform of Gaussian function with odd number of samples

I'm implementing a discrete inverse Fourier transform in Python to approximate the inverse Fourier transform of a Gaussian function. While the output looks promising, I'm encountering an unexpected ...
Peyman's user avatar
  • 3,919
0 votes
0 answers
62 views

Why does my numpy convolution appear off-centred?

The first part of this post is now not necessary for my question, please see the edit. I'm trying to convolve two probability maps in Python with numpy.convolve, and decided to use mode='same' so that ...
Jacob Ayre's user avatar
3 votes
1 answer
106 views

Thread safeness and slow pyplot.hist

The hist function of matplotlib.pyplot runs very slow which seemingly has to do with the structure I have chosen. I built a front panel in Tkinter which starts a control loop for a camera. To keep the ...
JMP's user avatar
  • 152
0 votes
1 answer
238 views

ValueError: object __array__ method not producing an array : it occor when I run my code [duplicate]

ValueError: object array method not producing an array and TypeError: Invalid shape (1, 1, 6, 6) for image data When attempting to run the following code, the following errors occur. Code import torch ...
M.M's user avatar
  • 9
-1 votes
2 answers
105 views

List of arithmetic sequences and cumulative sums [closed]

I have a list of time (seconds) that looks like that: l = [2,4,6,8,2,4,6,8,10,30,60,30,60] 2,4,6,8 is the first time interval. 2,4,6,8,10 the second time interval. 30,60 the third time interval. ...
pankan's user avatar
  • 47
1 vote
1 answer
38 views

scipy sosfilt array shape

I'm trying to plot a filter response in two ways, plot against time and the second plot against frequency. My aim is to plot cascaded filters, filter1 & filter2 for now. The plot against frequency ...
lambcutlet's user avatar

15 30 50 per page
1
2 3 4 5
443