


Actually, I think you are trying to use the 2D scatter plot function instead of a 3D one. Python, together with Matplotlib allow for easy and powerful data visualisation. G2 = ( 0.4+ 0.3 * np.random.rand(N), 0.5*np.random.rand(N), 0.1*np.random.rand(N)) ) And you are passing in three, so you are specifying s twice (once implicitly and once explicitly). G1 = ( 0.6 + 0.6 * np.random.rand(N), np.random.rand(N), 0.4+ 0.1*np.random.rand(N)) 3D scatter plot with Plotly Express¶ Plotly Express is the easy-to-use, high-level interface to Plotly, which operates on a variety of types of data and produces easy-to-style figures. The 3D plotting in Matplotlib can be done by enabling the utility toolkit. Give the data a z-axis and set the figure to 3d projection: Data Visualization with Matplotlib and Python.To create 3d plots, we need to import axes3d. On some occasions, a 3d scatter plot may be a better data visualization than a 2d plot. Making a 3D scatterplot is very similar to creating a 2d scatter plot, only some minor differences.
