-
Notifications
You must be signed in to change notification settings - Fork 213
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
Figures plotting only half in Jupyter #291
Comments
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct. |
Thanks for posting, @EJFielding. Edit: Whoops, I see that you mentioned the code that you're using above. Try setting a smaller figure width for the |
Thanks for the quick reply. Yes, if I set the It is good that the saved file is the same, so "what you see is what you get". |
@EJFielding Could you try following GMT commands in your terminal and check if the generated PNG file is correct?
Could you also please provide your GMT version ( |
I ran those GMT commands in the shell command line and I get the complete map.
|
Could you please paste the output of following Python codes? import pygmt
pygmt.print_clib_info() |
From Jupyter notebook, I get this:
|
I use MacPorts to install Python 3.6, so I kept my pygmt installation in my home directory tree to avoid messing with the MacPorts files, in case that makes a difference. |
It looks OK to me. I have no idea where the problem is. Let's wait for @leouieda. |
@EJFielding this is interesting. From GenericMappingTools/gmt#497 it seems to be a problem with the plot units. Could you share your cmake config for building GMT? |
Sure, I attach my config file. |
🤔 I don't see anything wrong with the setup. It doesn't seem to be a problem on the Python side. I can't reproduce the effect. Which version of ghostscript do you have? |
I have gs --version 9.26 |
When you do
it prints |
I have this default when I do that on the command line:
I am not sure how to check the defaults within the Jupyter notebook. |
It should be the same since we're using the same GMT library that the command line program uses. |
From the discussion in GenericMappingTools/gmt#497, do you have a |
Thanks! Yes, I have a gmt.conf in this directory because I was running GMT5. It has |
I think you can close this issue. Maybe it would help to put something in the documentation to remove any |
Thanks, Eric! It's good to know. We're actually discussing a better solution that wouldn't require the user to take action at GenericMappingTools/gmt#497 |
I managed to buiild GMT from source (kind of like the old days when editing the configuration file and building source was the only way). I installed pygmt and got it to import in my Jupyter notebook. When I try to make a simple plot like the "first-figure" example, it only plots the left half of the figure and chops off the top a little. This is the same for the Jupyter notebook and the saved png file. Here is the example saved:
![central-america-shorelines](https://user-images.githubusercontent.com/7253576/54081698-98b8a280-42bd-11e9-8159-397028da6357.png)
The text was updated successfully, but these errors were encountered: