Giter Club home page Giter Club logo

penguins's People

Contributors

yongrenjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fmarrabal

penguins's Issues

Allow 2D spectra to be plotted with accompanying projections

So far I've figured out how to do this when there's only one spectrum on an entire Figure, by passing gridspec_kw to subplots(). However, I think we can do this more generally (and with fewer inconsistencies with the existing API) using the axes_divider module, something like this: https://matplotlib.org/3.1.1/gallery/axes_grid1/demo_colorbar_with_axes_divider.html

The API should be kwarg(s) for _stage2d(), perhaps a dictionary projection_options, with keys f1 (bool), f2 (bool), f1_dataset (optional Dataset1DProj, defaults to ds.f1projp()), f2_dataset (optional Dataset1DProj, defaults to ds.f2projp()), ratio (float, ratio of main spectrum width vs projection), and maybe more keys to control geometry (whether f1proj appears on the left or the right...?).

How do we pass plot options, e.g. the color of projections? Can't have a nested dictionary can we...

Allow fast way of setting xlabel/ylabel location (and yticks for 2D)

For example for 2D spectra, all of this could be bundled into one function.

Alternatively, we could add another kwarg to mkplot2d(). That might actually be more sensible.

ax.yaxis.tick_right()
ax.yaxis.label.set_rotation(0)
ax.yaxis.label.set_horizontalalignment("left")
ax.yaxis.label.set_verticalalignment("top")
ax.yaxis.set_label_coords(1.02, 1)

plot spectra arrays

would be nice to have the x-axis be something apart from ppm, then we can show how a spectrum varies with p1 or some other parameter

Automatically add label to axes

Suggested interface - the function name can be changed

pg.add_numbering(axs, posn="upper left", type='a', start=1, fstr="({})", **kwargs)

axs - iterable of mpl.axes.Axes
posn - string where the label is placed
type - string from {'a', 'A', 'i', 'I', '1'} (what other options are there?)
start - int to start labelling from
fstr - format string, the text added is fstr.format(char)
**kwargs - keyword arguments passed on to ax.text()

awkward error message with ds.stage("1..2")

if "1..2" is passed as the first non-keyword argument, stage() thinks that it should be the axes, and then it raises a weird error about not having a PlotHoldingArea.

The error is technically correct, but could be more helpful.

Use a better github workflow

Reserve master for "stable" and "working" versions.. of course this doesn't actually mean anything until I actually add more tests!

Complete documentation

Checklist

Please see develop branch for updated docs.

  • Introductory tutorials
    • Tutorial 1: Reading
    • Tutorial 2: Plotting basics
    • Tutorial 3: 1D staging options
    • Tutorial 4: 1D mkplot() options
    • Tutorial 5: 2D staging options
  • Intermediate tutorials
    • Tutorial 6: Interfacing with matplotlib
    • Tutorial 7: Processing datasets
  • How-tos
    • Subplots
    • NUS data
    • Adding text
    • move_ylabel(), cleanup_axes(), cleanup_figure()
    • DRY
  • Explanations
    • Plot paradigm (needs to be updated)
    • Dataset mixins
  • Reference
    • Update to include all the newer functions

Tie staging to an Axes instance?

it seems that it might be logical to add an ax parameter to the staging -- we can add attributes on mpl.axes.Axes easily like the plot queue and plot properties, so those can then be accessed with ax.plot_queue, ax.color_generator etc

Empty the PHA anyway if mkplot() errors out

For a script this isn't a problem because any errors will stop execution immediately, but doing this avoids issues with the state of the PHA persisting between different cells of jupyter notebook (thus producing weird errors when a cell failed to plot a 1D spectrum, and the next cell tries to stage a 2D spectrum).

Just use try/finally code inside mkplot().

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.