You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Might not get to #79 for a while because it's kind of a tricky problem (dealing with different projections, axis labels on different sides of the subplots, etc). But for the time being you can just toggle labels for the edge subplots like so:
On May 24, 2020, at 7:56 PM, Xin Zhang ***@***.***> wrote:
Nice trick. But, it would change the xtick label and ytick label at the same time.
I'm trying to get the gridline from the GeoAxes and set some to False:
import proplot as plot
f, axs = plot.subplots(
nrows=2, ncols=2,
spany=3, sharey=3,
proj='lcc', proj_kw={'lon_0': 116}
)
axs.format(
coast=True,
latlines=1, lonlines=1,
lonlim=(113, 119),
latlim=(37, 41.5),
labels=True,
)
axs[1].gridlines().left_labels = False
However, it doesn't work and the lines are thicker.
<https://user-images.githubusercontent.com/30388627/82771204-cf9cb900-9e6d-11ea-867c-4aad0a2f3ee9.png>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub <#178 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEV7HNBXJGYOEBOK54R3GRDRTHF3HANCNFSM4NIXNT2A>.
I believe that issue is related to SciTools/cartopy#1556. The padding is dependent on the DPI of your saved PNG, because someone coded the padding as "dots" (pixels on your screen) instead of "points" (1/72 inches) in the cartopy source code. And proplot makes the default dpi for saved figures rc['savefig.dpi'] = 1200, much larger than the backend dpi rc['figure.dpi'] = 100, because 1200 dots per inch is recommended by most academic journals.
If you set the padding to a very large number, reduce the DPI with e.g. f.save('file.png', dpi=100), or save the file as PDF, this will change the padding.
Honesty if grid labels are important to you I recommend installing basemap and using basemap=True in your call to subplots(). Cartopy still has a lot of kinks to work out. For example:
Activity
lukelbd commentedon May 24, 2020
There's actually an open issue for this: #79
lukelbd commentedon May 25, 2020
Might not get to #79 for a while because it's kind of a tricky problem (dealing with different projections, axis labels on different sides of the subplots, etc). But for the time being you can just toggle labels for the edge subplots like so:
zxdawn commentedon May 25, 2020
Nice trick. But, it would change the
xtick labelandytick labelat the same time.I'm trying to get the gridline from the GeoAxes and set some to
False:However, it doesn't work and the lines are thicker.
lukelbd commentedon May 25, 2020
zxdawn commentedon May 25, 2020
Thanks, Luke!
It works well:

However the small space between tick and tick labels can't be changed using
tick.padandgrid.pad.lukelbd commentedon May 25, 2020
I believe that issue is related to SciTools/cartopy#1556. The padding is dependent on the DPI of your saved PNG, because someone coded the padding as "dots" (pixels on your screen) instead of "points" (1/72 inches) in the cartopy source code. And proplot makes the default dpi for saved figures
rc['savefig.dpi'] = 1200, much larger than the backend dpirc['figure.dpi'] = 100, because 1200 dots per inch is recommended by most academic journals.If you set the padding to a very large number, reduce the DPI with e.g.
f.save('file.png', dpi=100), or save the file as PDF, this will change the padding.Honesty if grid labels are important to you I recommend installing basemap and using
basemap=Truein your call tosubplots(). Cartopy still has a lot of kinks to work out. For example:zxdawn commentedon May 25, 2020
Thanks! Hope that issue will be fixed soon.
The reason why I don't use Basemap is the KeyError:
KeyError: 'PROJ_LIB'.This problem doesn't exist in Linux Terminal, but shows up in the editor like sublime text and pycharm (stackoverflow link):
lukelbd commentedon Jun 12, 2020
@zxdawn FYI SciTools/cartopy#1556 was just merged into cartopy's master branch