![]() 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: ![]() 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. How to Set Axis Ranges in Matplotlib You can use the following syntax to set the axis ranges for a plot in Matplotlib: specify x-axis range plt.xlim(1, 15) specify y-axis range plt.ylim(1, 30) The following examples show how to use this syntax in practice. 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 |