Skip to main content

All Questions

11 questions with no upvoted or accepted answers
2votes
1answer
189views

Reshaping a multidimensional array in a rolling/moving window manner and plot

I have a multi-dimension array generated using NumPy. array = np.random.rand(63, 4, 4) Now I want to generate images using the imshow() function from matplotlib, using a rolling/moving window manner ...
Starlord22's user avatar
2votes
0answers
274views

3D Plotting with 3D numpy array with given set of datas

I will be glad if someone can help me. I have 3 x 3 x 3 = 27 data points. I could make into 3 x 3 x 3 numpy array in python by using In>>a = np.array([1,2,3,-4,5,6,-2,5,7,-5,0,9,2,-3,4,5,-1,1,2,...
George_pc's user avatar
1vote
2answers
305views

Extreme Basics: Displaying an Array as an Image (2d or 3d)

I'm completely new to Numpy, and I have not used Python in almost 8 years [so it's best to assume I'm completely new to Python, too]. I am trying to display a 2-dimensional array as a colorful image....
JoeA's user avatar
1vote
0answers
256views

Plotting lines between values in a 2d numpy array

I have a 2d numpy array that consists of blocks of contiguous values. Here's an example. I would like to plot lines around the values. Is there a simple way to do this?
Chris's user avatar
0votes
0answers
81views

How to draw multiple 3d-surfaces in one plot with python matplotlib?

I got a xml file with this data structure: <TurnOnLoss> <ComputationMethod>Table and formula</ComputationMethod> <Formula>E/(5.3e-5*6.8+1.167e-3)...
HWJ's user avatar
0votes
0answers
289views

3D surface/volume plot of list

I would like to represent a set of 3D points as a surface. The points are in an array format for x, y, z. I managed to plot the points in 3D in a sub-optimal solution by adding an array c which just ...
P. Wulf's user avatar
0votes
0answers
257views

How to generate random vertices that form tetrahedrons?

I am trying to develop a random tetrahedron generator that can take a list of four coordinates and produce a tetrahedron. Currently, I am only able to plot a tetrahedron using four pre-determined ...
zx01p's user avatar
0votes
0answers
78views

Can't show vectors on zeroes of axes in Python Quiver

I'm trying to create a vector field using numpy and quiver. Unfortunately, the functions I use for the components of each vector require dividing by the values in the mesh field, so quiver won't show ...
Ben Rosin's user avatar
0votes
2answers
589views

Contour plot of 2d point data

I have set of data (values from 0 to 1) with corresponding coordinates, and I want to plot those data on map with matplotlib's contourf. The problem is that I have 30-40 data points and a coordinate ...
J. Doe's user avatar
0votes
0answers
181views

How to create a time varying plot (animation) of a 2D array that changes it's values in discrete time steps?

I have the following code where A is a 2D array that represents a plane grid in space. The values it contains are the values of a field that change with time. I want to show this variation in time as ...
Babaji's user avatar
0votes
1answer
54views

pyplot generates two different graphs?

I am trying to solve the wave equation using the central finite difference method. I started with a basic 2 dimensional Gaussian function as my initial condition u[x,y,t] = u[:,:,0] = init_fn(x,y) ...
soccerboyz9341's user avatar

close