Support size (N,1) numpy arrays where 1D arrays are supported
See original GitHub issueWhen I create my graphic using the online servers everything looks great. If I use the same commands but switch to the offline.plot
function, only part of my figure is correctly drawn. If I then click the “export to plot.ly” button at the bottom, everything appears normal. There are no errors in my console. I tried this with Google Chrome and Firefox. I’m using version 2.0.2 of plotly.py.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Indexing on ndarrays — NumPy v1.25.dev0 Manual
ndarrays can be indexed using the standard Python x[obj] syntax, where x is the array and obj the selection. There are different kinds...
Read more >Why Numpy has dimension (n,) instead of (n,1) only [duplicate]
Having "rows" and "columns" is a highly specialized context for array operations—but yes, a very common one: that's why numpy also supplies the ......
Read more >NumPy Array Shape - W3Schools
The shape of an array is the number of elements in each dimension. Get the Shape of an Array. NumPy arrays have an...
Read more >1.4.1. The NumPy array object - Scipy Lecture Notes
extension package to Python for multi-dimensional arrays ... len(b) # returns the size of the first dimension ... a = np.arange(10) # 0...
Read more >Python | Broadcasting with NumPy Arrays - GeeksforGeeks
The two arrays are compatible in a dimension if they have the same size in the dimension or if one of the arrays...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No problem! Sorry it took me so long. This issue arises when using
plotly
in a scientific setting. Often you are working with column vectors for mathematical reasons. This behavior would be confusing in that context, especially if you are used to usingmatplotlib
.Thanks for taking the time to include that example @alexfeld ! Can you let me know the reasoning/use case for passing
x = np.random.uniform(-3.,3.,(20,1))
rather thanx = np.random.uniform(-3.,3.,20)
? For scatter plots, x and y should be 1 dimensional.