Giter VIP home page Giter VIP logo

Comments (5)

lukelbd avatar lukelbd commented on May 19, 2024 1

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=':',
)

tmp

from proplot.

lukelbd avatar lukelbd commented on May 19, 2024

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.

bradyrx avatar bradyrx commented on May 19, 2024

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.

lukelbd avatar lukelbd commented on May 19, 2024

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.

bradyrx avatar bradyrx commented on May 19, 2024

Oops I think I read your comment as if that was a hacky workaround with the current infrastructure.

from proplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.