Skip to main content

All Questions

67votes
4answers
227kviews

Axes from plt.subplots() is a "numpy.ndarray" object and has no attribute "plot"

The information below may be superfluous if you are trying to understand the error message. Please start off by reading the answer by @user707650. Using MatPlotLib, I wanted a generalizable script ...
Lucubrator's user avatar
5votes
2answers
3kviews

Order of indexes in a Numpy multidimensional array

For example, say I'm simulating a bunch of particles doing something over time, and I have a multidimensional array called particles with these indexes: The x/y/z coordinates of the particle (of ...
Apocheir's user avatar
5votes
1answer
15kviews

How do I visualize or plot a multidimensional tensor?

I was wondering if anyone here has ever tried to visualize a multidimensional tensor in numpy. If so, could you share with me how I might go about doing this? I was thinking of reducing it to a 2D ...
CodeinCafes's user avatar
5votes
2answers
3kviews

How do I interpolate a 2D gridded point cloud to a continuous area?

I have a 2 dimensional Numpy NDarray filled with floats between 0 and about 8. This 2 dimensional arrays size is (1000, 1600) and there are about 1400 values, (the points in the point cloud), the ...
Baffel's user avatar
4votes
2answers
4kviews

How to slice up a numpy array with inequalities?

I've done my best to find a solution on my own but I'm just not turning up anything relevant. I've got some numpy arrays that are extracted from .tbl files (it's an astronomical table format that I'm ...
Teachey's user avatar
4votes
1answer
6kviews

Changing tick labels without affecting the plot

I am plotting a 2-D array in python using matplotlib and am having trouble formatting the tick marks. So first, my data is currently organized as a 2-D array with (elevation, latitude). I am plotting ...
Will.Evo's user avatar
3votes
1answer
7kviews

Using a condition to plot with matplotlib

I have a 2-D array and I need to plot columns x and y but only within a certain range of x. I know how to plot using the index but I need to specify the value of x. I have a few of those arrays so I ...
Labibah's user avatar
  • 5,741
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 ...
John_maddon's user avatar
2votes
1answer
2kviews

Scatter plot (2D), which shows a dotted circle and other 2D-shapes made by geometrical functions with ipython, numpy and matplotlib

I would to create an array with the "shape" (n, 2), which is creating a dotted circle, when plotted on a scatterplot. This would be the wanted form of the array: array([ (x1, y1), (x2, y2), ...
algomachine's user avatar
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
1answer
5kviews

plotting 3d vectors (arrays) in python

Using numpy Packet i produced vectors (arrays) contain x,y,z-coordinates of several atoms in a protein. I would like to plot these vectors. Does anybody know how to do this? Since I could't plot the ...
Taktech's user avatar
1vote
2answers
416views

How do I add a column to a python (matix) multi-dimensional array? [duplicate]

Possible Duplicate: What's the simplest way to extend a numpy array in 2 dimensions? I've been frustrated as a Matlab user switching over to python because I don't know all the tricks and get ...
user1695925's user avatar
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 ...
TornadoEric's user avatar
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 ...
rubengavidia0x's user avatar

153050per page
close