Skip to content
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

More Documentation Tweaks #314

Closed
1 of 3 tasks
dopplershift opened this issue Feb 10, 2017 · 6 comments
Closed
1 of 3 tasks

More Documentation Tweaks #314

dopplershift opened this issue Feb 10, 2017 · 6 comments
Assignees
Labels
Area: Docs Affects documentation Type: Bug Something is not working like it should
Milestone

Comments

@dopplershift
Copy link
Member

dopplershift commented Feb 10, 2017

Just a few minor issues to address after #309

  • Change autosummary template for classes to contain members, or any other such template needs
  • Fix sphinx reference markup for reference in natural_neighbor docstring (and maybe check for any others)
  • Try to solve missing links in examples
@dopplershift dopplershift added Area: Docs Affects documentation Type: Bug Something is not working like it should labels Feb 10, 2017
@jrleeman jrleeman added this to the Spring 2017 milestone Feb 14, 2017
@jrleeman
Copy link
Contributor

Looks like some functions not resolving to links is a sphinx gallery issue: sphinx-gallery/sphinx-gallery#113

@jrleeman jrleeman mentioned this issue Feb 27, 2017
@jrleeman
Copy link
Contributor

Autosummary documentation of methods appears to be non-trivial with our setup. Helpful info: http://stackoverflow.com/questions/38277358/autosummary-with-toctree-not-creating-documentation-for-methods

@jrleeman
Copy link
Contributor

There has been some progress on the sphinx-gallery linking issue, just not merged yet sphinx-gallery/sphinx-gallery#214

@kgoebber
Copy link
Collaborator

Don't know where to put this, but I was working on satellite image plotting and was looking for an easy way to identify the colormaps available in MetPy and modified the code from Matplotlib that does it for their colormaps. Might be good to put image somewhere, just didn't know where.

import numpy as np
import matplotlib.pyplot as plt
import metpy.plots.ctables

def plot_color_gradients(cmap_category, cmap_list, nrows):
    fig, axes = plt.subplots(nrows=nrows)
    fig.subplots_adjust(top=.93, bottom=0.01, left=0.32, right=0.99)
    axes[0].set_title(cmap_category + ' colormaps', fontsize=14)

    for ax, name in zip(axes, cmap_list):
        ax.imshow(gradient, aspect='auto', cmap=ctables.registry.get_colortable(name))
        pos = list(ax.get_position().bounds)
        x_text = pos[0] - 0.01
        y_text = pos[1] + pos[3]/2.
        fig.text(x_text, y_text, name, va='center', ha='right', fontsize=10)

    # Turn off *all* ticks & spines, not just the ones with colormaps.
    for ax in axes:
        ax.set_axis_off()

cmaps = list(ctables.registry.keys())
nrows = len(cmaps)
gradient = np.linspace(0, 1, 256)
gradient = np.vstack((gradient, gradient))

plot_color_gradients('MetPy', cmaps, nrows)
#plt.tight_layout()
plt.savefig('MetPy_colormaps.png',dpi=200)
plt.show()

metpy_colormaps

@dopplershift
Copy link
Member Author

It'd be good to put this in the colormap docs somewhere, like @jrleeman did for the symbols (which due to this bug you can't currently get to...)

@jrleeman
Copy link
Contributor

@kgoebber That should definitely be in there. I'll make sure it's in #326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Docs Affects documentation Type: Bug Something is not working like it should
Projects
None yet
Development

No branches or pull requests

3 participants