Giter Site home page Giter Site logo

niceplots's Introduction

NicePlots

A collection of small tweaks to improve Python / plotting

Build Status Documentation Status PyPI PyPI - Downloads Code style: black

How do I install?

Niceplots can be pip installed directly from PyPI

pip install niceplots

If you want to make changes

  • Clone this repository, then enter the folder in the command line terminal.
  • Enter pip install -e . within the niceplots folder.

Font installation (optional)

Niceplots will try and use the computer modern bright font for the best looking plots so be sure to install it as a system font if you want to recreate the style of the plots above. Otherwise, niceplots will still work but revert back to the matplotlib default sans-serif font, DejaVu Sans.

To install the font on Ubuntu, run the following commands:

sudo apt-get update
sudo apt-get install fonts-cmu

Arch linux users can get the font by installing the otf-cm-unicode package from AUR.

If niceplots doesn't recognize the font, it might be necessary to delete Matplotlib's font cache file from its location on your computer, likely in ~/.cache/matplotlib

How do I get set up?

  • Use import niceplots at the top of a file where you would like to use any function defined in this package.
  • Use niceplots.setRCParams() to set some matplotlib defaults for nice looking plots. Set dark_mode=True and set_background_color=True to make plots with a dark background.
  • Use niceplots.All() after all the plot commands to apply the niceplot standards on the figure.
  • To use the Matlab colormap "parula", execute from niceplots import parula then use parula.parula_map as your colormap within your plotting script. See the contour plot example code for an example of this.

Do you have docs?

Sort of, you can find our examples gallery and api documentation here

Contribution guidelines

  • Make any changes you see fit. Please fork your own version and submit a pull request.

Who do I talk to?

niceplots's People

Contributors

a-cgray avatar johnjasa avatar ewu63 avatar eytanadler avatar eirikurj avatar hajdik avatar jennank avatar marcomangano avatar

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.