Comments (5)
This is now in the master branch. Cartographic gridline properties are now controlled with the grid
and gridminor
rc categories (geogrid
has been deprecated -- the name will be translated and a warning will be issued when you try to use it).
Also, gridline location specs like lonminorlines=X
and lonlines=X
are now fully interpreted by constructor.Locator()
, and formatter specs are interpreted by constructor.Formatter()
-- this is done by linking them to dummy _LonAxis
and _LatAxis
axes that track the map extent in degrees longitude/latitude -- there is no longer a need for lonstep
and latstep
settings since the default MaxNLocator
chooses appropriate intervals given the zoom level, just like with ordinary Cartesian plots. #167 really cleaned things up a lot.
Here's an example from the website:
# %%
import proplot as plot
fig, axs = plot.subplots(
[[1, 1, 2], [3, 3, 3]],
axwidth=4, proj={1: 'eqearth', 2: 'ortho', 3: 'wintri'},
wratios=(1, 1, 1.2), hratios=(1, 1.2),
)
axs.format(
suptitle='Projection axes formatting demo',
collabels=['Column 1', 'Column 2'],
abc=True, abcstyle='A.', abcloc='ul', abcborder=False, linewidth=1.5
)
# Styling projections in different ways
ax = axs[0]
ax.format(
title='Equal earth', land=True, landcolor='navy', facecolor='pale blue',
coastcolor='gray5', borderscolor='gray5', innerborderscolor='gray5',
gridlinewidth=1.5, gridcolor='gray5', gridalpha=0.5,
gridminor=True, gridminorlinewidth=0.5,
coast=True, borders=True, borderslinewidth=0.8,
)
ax = axs[1]
ax.format(
title='Orthographic', reso='med', land=True, coast=True, latlines=10, lonlines=15,
landcolor='mushroom', suptitle='Projection axes formatting demo',
facecolor='petrol', coastcolor='charcoal', coastlinewidth=0.8, gridlinewidth=1
)
ax = axs[2]
ax.format(
land=True, facecolor='ocean blue', landcolor='bisque', title='Winkel tripel',
lonlines=60, latlines=15,
gridlinewidth=0.8, gridminor=True, gridminorlinestyle=':',
)
from proplot.
Makes sense to me -- having labeled and unlabeld gridlines would be analogous to having "major" and "minor" ticklines. You could do something like lonlines=10
with minorlonlines=5
. I'll implement it when I get the chance -- will just require drawing two gridliner objects.
from proplot.
FYI @lukelbd, it looks like the minorlonlines
keyword is gone from Axes.format
. And there is no plot.rc.['gridminor.lonstep']
to access. I can't find any path forward to declare the minor grid line stepping/labeling in the current version.
from proplot.
Hmm not sure that was ever a feature. Can you point to a commit? For now you can do this manually using the cartopy Gridliner.
from proplot.
Oops I think I read your comment as if that was a hacky workaround with the current infrastructure.
from proplot.
Related Issues (20)
- ticks rotation does not work sometimes HOT 1
- unexpected minor ticks in colorbar
- Hide datetime minorticks?
- Feature request: allow a single label for a group of lines HOT 4
- add more color blind-friendly default color cycle
- bug: cannot set equal aspect for log scale HOT 1
- Support for plotting distribution with different number of samples HOT 6
- How to set the order of 'abc'? HOT 1
- Bug: xticklabels overwrites xminorticks setting HOT 3
- Cannot pass norm argument to hist2d
- Any timeline for a relase that supports matplotlib >=3.5?
- Proplot changes names of colormaps to lowercase, breaking `matplotlib.pyplot.get_cmap`
- MatplotlibDeprecationWarning with unexpected argument for savefig() HOT 3
- proplot can't plot string like datetime
- Inset_axes zooms doesn't show lines
- Trying to make a line over contourf returns TypeError HOT 5
- TypeError: tricontourf() takes 4 positional arguments but 5 were given
- Option for adding errorbar legend
- Nonsticky bounds
- How to use proplot in MATLAB HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proplot.