-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log_viewer doesn't work as expected in Jupyter notebook #4
Comments
The LogViewer is working somewhat correctly. When initialized without providing the top of the viewer, it will show the top of the log. For the example log, the data is mainly null at the top. Specify a depth when intializing with viewer_with_top = ptr.LogViewer(log, top = 6900) Please try this and see how the graph responds. There also appears to be something going on with the depth axis as it is not inverted as it should be. |
@toddheitmann - thank you - this is really helping! Don't know how I missed that parameter. I also don't know why my depths are off - I tried to get latest commit in the master branch - still the same issues with depth. What versions of matplotlib do you use? How can I replicate your experience? |
I have mainly used Windows and macOS to run this, so thank you for the update and using it on linux. Line 781 is where I invert the y-axis for the plot. Maybe try this code: import petropy as ptr
log = ptr.log_data('WFMP')
viewer = ptr.LogViewer(log, top = 6900)
ax_zero = viewer.axes[0]
ax_zero.invert_yaxis()
viewer.show() The LogViewer class keeps the log, matplotlib figure, and matplotlib axes as attributes to customize the appearance after the main graph is created. See this example where a logo is added to the upper left and log information is added to the upper right. |
Yep - it did the trick. I wonder why it's an issue in Linux. Here is how I changed the code in my private version of it - to make it work. Don't know if I need it to be done for all axis and if this way of doing it has any drawbacks - but it works: #plt.gca().invert_yaxis()
for ax in self.axes:
ax.invert_yaxis() |
Here is the versions of pandas, numpy and matplotlib I'm using.
And here is what I'm getting:
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: