11/18/2023 0 Comments Matplotlib 3d scatter axis labelsMaybe this is overriding the set_lim methods. You could have a look at switching off autoscaling of axes which is on by default. You could use these to fix the limits of your axes. Because of the 3D view this makes them appear a bit below where you would expect them to be. So what can I do to make it so that the tick marks are fixed so the point moves rather than the tick marks changing?Īn Axes3D object (your ax variable) has the following methods: set_xlim, set_ylim, and set_zlim. They do align, but with the horizontal position centered at the tick. Here is an example of the data: x.mean y.mean z.mean time Given the above, to create a 3D scatter plot with Matplotlib, you would need to: Create a new Figure on which to place the scatter plot. Here is my code: from mpl_toolkits.mplot3d import Axes3Dĭata = pickleLoad('/Users/ryansaxe/Desktop/kaggle_parkinsons/accelerometry/LILY_dataframe')ĭf = data.ix]Īx = fig.add_subplot(111, projection='3d') import matplotlib.pyplot as plt line plt.figure () plt.plot (xvalue, yvalue) plt.grid (True) plt.savefig ('test.png') plt. In the code below, the y-axis label is not in the place I want it. This makes my life very difficult because I don't see the motion on the point. I have this following code in order to generate scatterplots. matplotlib 3d: Axis label padding when spine positions are changed. No matter what I seem to do, the point is always placed in the center of the graph and the tick marks on the axis change in order to do that. So I have a 3d live-updating graph! it only shows one point at a time so I can easily track the motion of the point! But here is the problem:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |