Contents¶
Overview¶
_this is an experimental project._
docs | |
---|---|
tests | |
package |
Plotting templates common in biological sciences.
Installation¶
pip install bioplottemplates
You can also install the in-development version with:
pip install https://github.com/joaomcteixeira/python-bioplottemplates/archive/master.zip
Documentation¶
Reference¶
bioplottemplates¶
BioPlot Templates.
- This package contains useful plotting templates for
- biological sciences.
Plots¶
Plot a single parameter.
-
bioplottemplates.plots.param.
plot
(x_data, y_data, *, labels='No label provided', title=None, xlabel=None, ylabel=None, colors=('b', 'g', 'r', 'c', 'm', 'y', 'k'), alpha=0.7, xmax=None, xmin=None, ymax=None, ymin=None, grid=True, grid_color='lightgrey', grid_ls='-', grid_lw=1, grid_alpha=0.5, legend=True, legend_fs=6, legend_loc=4, vert_lines=None, figsize=(8, 6), filename='plot_param.pdf', **kwargs)[source]¶ Plot a single plot with the combined RMSD.
Bellow parameters concern data representation and are considered of highest importance because their incorrect use can mislead data analysis and consequent conclusions.
Plot style parameters concernning only plot style, i.e., colors, shapes, fonts, etc… and which do not distort the actual data, are not listed in the paremeter list bellow. We hope these parameter names are self-explanatory and are listed in the function definition.
Parameters: - x_data (interable of numbers) – Container of the X axis data. Should be accepted by matplotlib.
- y_data (np.ndarray, shape=(M,)) – Container of the Y axis data. Where M is the RMSDs data for the combined chains.
- labels (str, optional) – The label to represent in plot legend. If a list of series is provided, a list of labels can be provided as well. Defauts to: “no labels provided”.
- filename (str, optional) – The file name with which the plot figure will be saved in disk. Defaults to rmsd_individual_chains_one_subplot.pdf. You can change the file type by specifying its extention in the file name.
- fig_size (tuple of float or int) – The size ratio of the subplot in the figure.
Plot a single parameter.
-
bioplottemplates.plots.label_dots.
plot
(x_labels, y_data, title=None, xlabel=None, ylabel=None, series_labels=None, legend=True, legend_fs=6, legend_loc=4, numeric_x_labels=False, colors=('b', 'g', 'r', 'c', 'm', 'y', 'k'), alpha=0.7, grid=True, grid_color='lightgrey', grid_ls='-', grid_lw=1, grid_alpha=0.5, figsize=(10, 6), filename='plot_param.pdf', **kwargs)[source]¶
Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
Bug reports¶
When reporting a bug please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Documentation improvements¶
BioPlotTemplates could always use more documentation, whether as part of the official BioPlotTemplates docs, in docstrings, or even on the web in blog posts, articles, and such.
Feature requests and feedback¶
The best way to send feedback is to file an issue at https://github.com/joaomcteixeira/python-bioplottemplates/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that code contributions are welcome :)
Development¶
To set up python-bioplottemplates for local development:
Fork python-bioplottemplates (look for the “Fork” button).
Clone your fork locally:
git clone git@github.com:joaomcteixeira/python-bioplottemplates.git
Create a branch for local development:
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, run all the checks, doc builder and spell checker with tox one command:
tox
Commit your changes and push your branch to GitHub:
git add . git commit -m "Your detailed description of your changes." git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Pull Request Guidelines¶
If you need some code review or feedback while you’re developing the code just make the pull request.
For merging, you should:
- Include passing tests (run
tox
) [1]. - Update documentation when there’s new API, functionality etc.
- Add a note to
CHANGELOG.rst
about the changes. - Add yourself to
AUTHORS.rst
.
[1] | If you don’t have all the necessary python versions available locally you can rely on Travis - it will run the tests for each change you add in the pull request. It will be slower though … |
Tips¶
To run a subset of tests:
tox -e envname -- pytest -k test_myfeature
To run all the test environments in parallel (you need to pip install detox
):
detox
Authors¶
- Joao MC Teixeira - http://bit.ly/joaomcteixeira
Changelog¶
0.1.1 (2020-01-14)¶
- added
plotlabeld
interface forlabel_dots
.
0.1.0 (2019-12-20)¶
- added xmin, xmax, ymin and ymax options in plots.param.plot.
- Implemented client interface for
param
.
0.0.4 (2019-12-15)¶
- Implemented
cli_labeldots
and general cli interface - Implemented
label_dots
plot template - Removed spellcheck from Travis-CI (PR164)
0.0.3 (2019-10-14)¶
- Supports just Python >= 3.6
- Coverage details reported just from Travis-CI
- Added new stats badges
- Removed CI for OSX.
0.0.0 (2019-10-10)¶
- First release on PyPI.