Giter VIP home page Giter VIP logo

matplotlibrc's Introduction

matplotlibrc

##Summary:

example_image

example_image_2

This matplotlibrc provides a quick starting point so that any plotting you do with matplotlib looks nice off the bat. It includes font sizing, nice formatting of subscripted and superscripted text (with mathtext), a better color wheel, high-dpi defaults, a pretty grid, outward-facing tickmarks, and nicer line bend handling.

Unfortunately, the ticks by default are on the outside of all 4 sides, which I am not a huge fan of. This can only be solved with code within the script (below).

The title also correspondingly hangs too low with the new, larger font. To fix this, declare "y=1.08" as an argument when making your title. I also recommend adding some padding around the labels with "labelpad=10"

Examples of these changes are below as well as in the test script which generates the image at the top of this readme.

##Example usage:

This script will work with any matplotlib as long as it is in the right place (see Conditions to Run) but I recommend the following additional bits in your plotting script:

ax.yaxis.set_ticks_position('left') # this one is optional but I still recommend it...
ax.xaxis.set_ticks_position('bottom')
ax.set_title("Title goes here", y=1.05)
ax.set_ylabel("Ylabel Goes Here", labelpad=10)
ax.set_xlabel("XLabel goes here",labelpad=10)

Additionally, you should probably mess with the formatting for error bars but I don't have a recommended setting for this... Please contribute if you find one!

##Conditions to run:

Copy the matplotlibrc file to ~/.matplotlib/matplotlibrc.

If you feel fancy, you can run:

ln -s ./matplotlibrc ~/.matplotlibrc/matplotlibrc

###Software requirements:

python==2.7.8
matplotlib==1.3.1

Citations

I shamelessly copied the color wheel from Stephen Few's book Show me the Numbers

matplotlibrc's People

Contributors

bbarad avatar

Watchers

 avatar  avatar  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.