Skip to main content

All Questions

Tagged with
0 votes
0 answers
123 views

What's causing this weird jump in these phase graphs of Fourier coefficients?

from an assignment in signal processing in Python. It's all done in Python (through Google Colab) with the libraries cmath, numpy, and matplotlib alone. Signal a is a window signal, and I calculate ...
Nate3384's user avatar
  • 164
3 votes
1 answer
75 views

Why is the bounding box not aligned to the square?

import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Rectangle def generate_square_image(size, square_size, noise_level=0.0): """ Generates an ...
Academic's user avatar
  • 325
0 votes
0 answers
57 views

how put differents color in the graph in the backgound with matplotlib

enter image heat transferthere is my code but I would like to change just the blue color in the background, put one or two colors in the background it's the heat transfert between beam, earth in the ...
FEYSAL AL-RAHMAN MOUCKEYTOU's user avatar
0 votes
2 answers
125 views

fitting theory with experimental data

I want to do fitting on experimental data and my theory I want to try to find the parameters that fit the same as the theory and experiment do I have to make an algorithm? what algorithm do I use to ...
Tengga Arlan's user avatar
0 votes
1 answer
74 views

Problems when using np.arctan2 to plot domain colored complex function

I'm a physics student. I'm trying to write a program to visualize complex functions in different ways using Python with matplotlib and numpy. I've written a class whose object takes as input, among ...
Luke__'s user avatar
  • 255
3 votes
1 answer
78 views

matplotlib waterfall plot with surfaces shows black artifacts on border of plot

I have a script to write a heatmap (or contour map) inside an arbitrary closed shape. A bounding box of grid points is created and a mask is used to clip any points outside of the shape. However, if I ...
noobquestionsonly's user avatar
1 vote
1 answer
63 views

Log plot point/ticks not showing in the pyplot [duplicate]

I want to create a log plot However, the result does not show the minor grid and something like this enter image description here What can I do with the script. Thank you! import matplotlib.pyplot as ...
Armando Ariakta Aloanis's user avatar
0 votes
1 answer
73 views

Tangent points to a rotated ellipse from outer point

C = known outer point, Expected result A(x,y), B(x1,y1) I guess the answer could be hidden inside first answer here, which calculates tangents slopes & intercepts. Modified a bit I assume. ...
Miran C's user avatar
  • 115
1 vote
2 answers
124 views

How can I produce a delta plot between two RGB image with the same pixel size? [closed]

I have two RGB images of representing plot of a scalar variable on some geometry. My goal is to find a way to plot the difference of that variable btween the two images and color it with a custom ...
alie89's user avatar
  • 19
0 votes
1 answer
39 views

Matplotlib polygons: Polygons are skewed after rotation

I am trying to draw an object defined by several vertices and then rotate it by defining a face and a vector that I want that face to be normal to. It works fine if I choose a vector that is parallel ...
dreed75's user avatar
  • 117
0 votes
0 answers
55 views

Failing to clip image to rotated polygon in matplotlib

On my project I want to clip pv_module image into rotated rectangle polygons using matplotlib. My problem is that on many of the rotation azimuths the image is not clipped well, so the image fit only ...
Nitcha's user avatar
  • 45
1 vote
2 answers
131 views

How to plot a Probability Density Function in Python?

I want to plot a Probability Density Function for the offsets from a log file. Here is the code: timestamps = [] sequences = [] log_Name = 'test_rtt_25-01-17_13-07-41_values5_rate50.log' log_Path = &...
HUH987's user avatar
  • 17
1 vote
1 answer
76 views

Alternatives to Power Spectral Density for Response of an Oscillator

Background: Antiresonance is the phenomenon when the amplitude of a system (say an oscillator) shows a significant dip. Here is an article in Wikipedia discussing the same in a coupled system. The ...
Sourin Dey's user avatar
1 vote
1 answer
72 views

Why Cannot Matplotlib Library Produce Me a Normal Graph? I Keep Getting a Disfigured Image

I am using PyCharm 2023.2.3 and Python 3.12. The following code import matplotlib.pyplot as plt import numpy as np xs = np.array([100, 500]) ys = np.array([300, 800]) plt.plot(xs, ys) plt.show(...
Aleksandr Ershov's user avatar
4 votes
2 answers
147 views

Numerically obtaining response of a damped driven oscillator gives peak at wrong frequency

I am trying to plot the response of a periodically-driven damped oscillator whose dynamics is governed by, x''+ 2Gx' + f0^2 x = F cos(ft) where the constants denote the following. G: Damping ...
Sourin Dey's user avatar

15 30 50 per page
1
2 3 4 5
400