P = ax.scatter(Vr,Dm,Mo,c=misfits,vmin=0.3,vmax=1,s=2,edgecolor='none',marker='o')įig.colorbar(p, ticks=arange(0.3,1+0.1,0. 22 When I'm adding the c option to a scatterplot in matplotlib, the x axis labels dissapear. fig = figure(2)Īx = fig.add_subplot(111, projection='3d') Any help or advice would be very welcome. This is the entire code for this figure in particular. If I try to set the z-axis as logarithmic (by adding the line ax.set_zscale('log')), the resulting scaling does not seem to work properly, because the ordering of each power is not equally spaced:Īnd finally, If I try to limit the z-axis to the range of values that I'm interested (by simply adding the line ax.set_zlim3d(1e17,1e19)), instead of cutting the dots to the defined range in this axis, they seem to scape from the graph: Syntax scatter3D (xs, ys, zs0, zdirz, s20, cNone, depthshadeTrue, args, dataNone, kwargs) Parameters: x, y: float or array-like The data points. This is the original figure with linear axes and without restricting the z-axis: Maybe there is a bug in Matplotlib, or I'm not using the commands correctly. I tried different options that I saw in other forums, but the plot does not work properly. I'm plotting the parameter ( Mo) in the z-axis, and would be great to set only this axis to be logarithmic with the range of values that matters. One of those parameters ( Mo) has a variability of values between 10^15 and 10^20 approximately, and I'm interested in plotting the good solutions (blue dots), which vary from 10^17 to 10^19. I performed a Monte Carlo inversion of three parameters, and now I'm trying to plot them in a 3-D figure using Matplotlib.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |