Skip to main content

All Questions

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)...
0votes
1answer
1kviews

3D graphing the complex values of a function in Python

This is the real function I am looking to represent in 3D: y = f(x) = x^2 + 1 The complex function would be as follows: w = f(z) = z^2 + 1 Where z = x + iy and w = u + iv. These are four dimentions (x,...
1vote
3answers
5kviews

How to make a 3D plot (X, Y, Z), assigning Z values to X,Y ordered pairs?

I am trying to plot a 3D chart, where my Z values would be assigned to each [X,Y] ordered pair. For example, these are my X, Y and Z values: X = [1,2,3,4,5] Y = [1,2,3,4,5] Z = [10, 20, 30, 40, 50, ...
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 ...
0votes
1answer
50views

How do i plot 2d array by coverting 2d arrays into two one 1d arrays?

I have Latitude and Depth, I want to seprate these two arrays in form of numpy array. [['Latitude' 'Depth'] ['28.00303425' '5067.9097'] ['28.00304059' '5068.656'] ... ['28.01996016' '5067.0303'] ['28....
1vote
1answer
127views

Plotting a function u(x,y) at different 'x' locations in Python

I have a NumPy matrix of the form u(x,y) which represents the velocity of the fluid in the x-direction. For now, let us consider that u, x, and y as follows: nx,ny = 101,101 # no_of_points x = np....
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 ...
0votes
2answers
233views

How to average data for a variable over a number of timesteps

I was wondering if anyone could shed some light into how I can average this data: I have a .nc file with data (dimensions: 2029,64,32) which relates to time, latitude and longitude. Using these ...
1vote
1answer
491views

Generate Streamplot With 2D Raster Arrays

I am attempting to generate a streamplot in Matplotlib using u-component & v-component winds from a gridded analysis, and am unsure how to compile these arrays into the Streamplot function. These ...
0votes
1answer
290views

Python: Appending 2D arrays from meshgrid

I'm plotting two surface plots in python obtained from np.meshgrid, which I want to append to create only one surface plot. For instance: fig = plt.figure(figsize=(8,4)) ax = fig.add_subplot(...
1vote
1answer
2kviews

How to Plot in 3D Principal Component Analysis Visualizations, using the fast PCA script from this answer

I found this fast script here in Stack Overflow for perform PCA with a given numpy array. I don't know how to plot this in 3D, and also plot in 3D the Cumulative Explained Variances and the Number of ...
3votes
1answer
1kviews

Confidence Interval 3 dimensional plot

I have a 3-dimensional plot and I am able to plot it with the code written below. Considering that my point distribution is represented by a 100x100 matrix, is it possible to plot a confidence ...
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 ...
0votes
1answer
202views

normalization of values in python np array gone wrong?

I have a matrix of floats shaped (3000, 9). Across 1 line, there is 1 ''simulation''. Across columns, for a fixed line, there's the contents of the ''simulation''. I want that for each simulation, the ...
1vote
1answer
172views

Plotting a 3D array second by second without converting it to 2D with np.concatenate, np.append or indexing

x = np.array[[[8, 7, 1, 0, 3], [2, 8, 5, 5, 2], [1, 1, 1, 1, 1]], [[8, 4, 1, 0, 0], [6, 8, 5, 5, 2], [1, 1, 1, 1, 1]], ...

153050per page
close