Official Matplotlib cheat sheets

Overview

Cheatsheets

Handouts

How to compile

  1. You need to create a fonts repository with:

On Linux, with make installed, the fonts can be set up with the following command:

make -C fonts

The fonts can be made discoverable by matplotlib (through fontconfig) by creating the following in $HOME/.config/fontconfig/fonts.conf (see here):

/path/to/cheatsheets/fonts/ ... ">
xml version="1.0"?>
DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/path/to/cheatsheets/fonts/dir>
...
fontconfig>
  1. You need to generate all the figures:
$ cd scripts
$ for script in *.py; do python $script; done
$ cd ..
  1. Compile the sheet
$ xelatex cheatsheets.tex
$ xelatex cheatsheets.tex
Comments
  • Issue with build process

    Issue with build process

    I am attempting to build this repo with gitbash in Windows 10 pro. I have cloned the repo to a folder /git/cheatsheets and created /git/cheatsheets/fonts with all the required sub-folders as described in the README. However, when running the python scripts in the scripts directory I am getting a failure of

    "findfont: Font family ['Source Code Pro'] not found. Falling back to DejaVu Sans."

    I am guessing I have put the fonts folder in the wrong location and/or finding the fonts on the Windows file system is not working as expected.

    Any help would be appreciated.

    opened by btharbaugh 14
  • Automatic building of the PDF and the PNG files

    Automatic building of the PDF and the PNG files

    It would be nice to have an automatic building of the PDF and PNG for each commit but I don't know if it is possible with e.g. Travis. It would require a partial TeXLive installation and I'm not sure how to setup.

    Also, some have been manually post-processed with pdfcrop (to remove white margin) and this should be automatized.

    opened by rougier 13
  • update selection of interpolation methods

    update selection of interpolation methods

    Attempts to address #28.

    • replace 'none' with blackman

    Something else to consider would be making the image data the same as what is used in the current matplotlib gallery example for the interpolation methods. To that effect, I could add a commit to this PR.

    opened by jimustafa 10
  • Automatically generated logo for the cheatsheets

    Automatically generated logo for the cheatsheets

    As has been discussed in #32, there is a need to keep the matplotlib logo in the cheatsheets up to date with the correct version in the tag line. This PR does a couple of things:

    • upgrades and pins the matplotlib version, updates the dependencies, and simplifies the requirements specification
    • adds a script for generating the matplotlib logo, originally written by @timhoffm
    • modifies the script to include "Cheat sheets" and the matplotlib version in the tag line

    There may be some small tweaks to make the logo more closely resemble the one by @rougier; well, maybe also a big tweak, as the font is currently Carlito, not Calibri.

    opened by jimustafa 10
  • cheatsheets-2.png shows interpolation different for none vs None

    cheatsheets-2.png shows interpolation different for none vs None

    If you look at the imagine cheatsheets-2.png linked in the README.md: https://github.com/matplotlib/cheatsheets/blob/master/cheatsheets-2.png

    in the interpolations image grid, the "none" version actually is using some sort of interpolation. This makes it seem like "none" and None are different, but they should not be.

    When I run the interpolations.py script locally (https://github.com/matplotlib/cheatsheets/blob/master/scripts/interpolations.py) I get the following:

    interpolations.pdf

    which has the correct top row.

    The image in the repo should be updated.

    opened by zingale 8
  • add candlestick cheat .

    add candlestick cheat .

    the most important thing on charting is finansal charts that matplotlib didnt work around it. yes it have some libs and things but not sharply have do something for that. please add cheatsheat for finansal and candlistic charts to help us thanks

    opened by mablue 6
  • Simplifying code

    Simplifying code

    Most, if not all, np., plt., ax., fig., and mpl. can be safely removed if importing * directly in the main name namespace. Currently there are so many useless repetitions, IMHO.

    from matplotpib.pylab import *
    

    would make things much cleaner and simple.

    opened by Atcold 6
  • Missing name style

    Missing name style

    Thanks for the great cheatsheets!

    The first page in Matplotlib cheatsheets, chart "style name" missing in "Style" - plot (2,1), that looks like "ggplot"

    opened by fgomezdelarosa 6
  • cmap() can be called on array-like

    cmap() can be called on array-like

    No need for a list comprehension; just call cmap(list).

    Also, use Oranges colormap instead of Blues because the illustrative image is in orange and using Blues is slightly confusing then.

    opened by timhoffm 6
  • Update for version 3.5.0

    Update for version 3.5.0

    • make room for two additional annotation arrow styles (so that 'wedge' is show again)
    • add possibility to set tick labels together with tick positions
    opened by StefRe 5
  • Update Color Names plot

    Update Color Names plot

    • add default color cycler colors (C0 ... C9)
    • group synomys (e.g. black, k or aqua, cyan), combining gray and grey into gr[ae]y to save space
    • some minor flake8 fixes

    I think it's essential to show the default color cycler colors in this plot too. In order to not reduce the size of the color patches I've put color name synonyms together and combined the various ...gray/...grey names to ...gr[ae]y much in the same way as used elsewhere in this cheatsheet.

    opened by StefRe 5
  • Update for 3.6.0

    Update for 3.6.0

    This requires updating the Sphinx theme (e.g. matplotlib/mpl-third-party#134), but also auditing the plots to make sure they did not break or could be using newer stuff.

    opened by QuLogic 1
  • Clarify when to use None / np.nan to segement data

    Clarify when to use None / np.nan to segement data

    see https://github.com/matplotlib/matplotlib/issues/23714

    These is some user confusion about when to use ax.plot with np.nan separated data and when something like LineCollection is a better choice. In particular, using the segmented data approach the line will be drawn as a single path which will not show self-intersection for alpha < 1.

    opened by tacaswell 2
  • Replace step with stairs and correct subplot_adjusts

    Replace step with stairs and correct subplot_adjusts

    Closes #109 Closes #111

    Hard to make the subplot_adjusts figure look really good, but here is the update one: image

    Stairs illustration: image

    (Both are screen shots of the PDF.)

    Not obvious which arguments should be used. I went with those that are (a bit) "special" for stairs.

    opened by oscargus 4
  • 'right' and 'top' in plt.subplots_adjust() are not directly padding size

    'right' and 'top' in plt.subplots_adjust() are not directly padding size

    Very thankful of the cheatsheet, but I think there's a little problem. In 'Axes adjustments' of the second cheatsheet, 'right' directly refers to the padding between subplots' right edge and figure's right edge. However it actually refers to the relative distance between subplots' right edge and figure's left edge. The same also applies to 'top'.

    cheatsheet 
    opened by K-gihu 3
Owner
Matplotlib Developers
Matplotlib Developers
Official Matplotlib cheat sheets

Official Matplotlib cheat sheets

Matplotlib Developers 6.7k Jan 9, 2023
Google Sheets Python API

Google Spreadsheets Python API v4 Simple interface for working with Google Sheets. Features: Open a spreadsheet by title, key or url. Read, write, and

Anton Burnashev 6.2k Dec 30, 2022
Google Sheets Python API v4

pygsheets - Google Spreadsheets Python API v4 A simple, intuitive library for google sheets which gets your work done. Features: Open, create, delete

Nithin Murali 1.4k Jan 8, 2023
Google Sheets Python API v4

pygsheets - Google Spreadsheets Python API v4 A simple, intuitive library for google sheets which gets your work done. Features: Open, create, delete

Nithin Murali 1.4k Dec 31, 2022
ProPublica's collaborative tip-gathering framework. Import and manage CSV, Google Sheets and Screendoor data with ease.

Collaborate This is a web application for managing and building stories based on tips solicited from the public. This project is meant to be easy to s

ProPublica 86 Oct 18, 2022
ProPublica's collaborative tip-gathering framework. Import and manage CSV, Google Sheets and Screendoor data with ease.

Collaborate This is a web application for managing and building stories based on tips solicited from the public. This project is meant to be easy to s

ProPublica 86 Oct 18, 2022
A post-processing tool for scanned sheets of paper.

unpaper Originally written by Jens Gulden — see AUTHORS for more information. Licensed under GNU GPL v2 — see COPYING for more information. Overview u

null 27 Dec 7, 2022
frida-based ceserver. iOS analysis is possible with Cheat Engine.

frida-ceserver frida-based ceserver. iOS analysis is possible with Cheat Engine. Original by Dark Byte. Usage Install frida on iOS. python main.py Cyd

KenjiroIchise 89 Jan 8, 2023
A Discord BOT that uses Google Sheets for storing the roles and permissions of a discord server.

Discord Role Manager Bot Role Manager is a discord BOT that utilizes Google Sheets for the organization of a server's hierarchy and permissions. Detai

Dion Rigatos 17 Oct 13, 2022
PySpark Cheat Sheet - learn PySpark and develop apps faster

This cheat sheet will help you learn PySpark and write PySpark apps faster. Everything in here is fully functional PySpark code you can run or adapt to your programs.

Carter Shanklin 168 Jan 1, 2023
Report Bobcat Status to Google Sheets

bobcat-status-reporter Report Bobcat Status to Google Sheets Why? I recently relocated my miner from my root into the attic. Bobcat recommends operati

Jasmit Tarang 3 Sep 22, 2021
🍦 Cheat for cs:go written in Python.

Cs::Fuck ?? Cheat for cs:go written in Python. You can show a video here: https://vimeo.com/642730650 Feature. TriggerBot Glow Esp NoFlash Setup. 0. p

Ѵιcнч 10 Sep 23, 2022
Autodrive is designed to make it as easy as possible to interact with the Google Drive and Sheets APIs via Python

Autodrive Autodrive is designed to make it as easy as possible to interact with the Google Drive and Sheets APIs via Python. It is especially designed

Chris Larabee 1 Oct 2, 2021
A cs:go cheat/hack made in Python3.

Atomic ?? Cheat for cs:go written in Python. Features. Glow Esp No Flash Bunny Hop Third Person To-Do. It is prefered to start the cheat when you are

Sofia 6 Feb 12, 2022
This python cheat utilizes PyMeow, PyMem, and others to enhance your CS:GO experience ;).

CSGO-Python-Cheat This python cheat utilizes PyMeow, PyMem, and others to enhance your CS:GO experience ;). Features Esp Tracers Chams (More to come)

Addi 1 Nov 30, 2021
A discord bot that utilizes Google's Rest API for Calendar, Drive, and Sheets

Bott This is a discord bot that utilizes Google's Rest API for Calendar, Drive, and Sheets. The bot first takes the sheet from the schedule manager in

null 1 Dec 4, 2021
An osu! cheat made in c++ rewritten in python and currently undetected.

megumi-python An osu! cheat made in c++ rewritten in python and currently undetected. Installation Guide Download python 3.9 from https://python.org C

Elaina 2 Nov 18, 2022
Make visual music sheets for thatskygame (graphical representations of the Sky keyboard)

sky-python-music-sheet-maker This program lets you make visual music sheets for Sky: Children of the Light. It will ask you a few questions, and does

null 21 Aug 26, 2022
Frida-based ceserver.iOS analysis is possible with Cheat Engine.

frida-ceserver frida-based ceserver. iOS analysis is possible with Cheat Engine. Original by Dark Byte. Usage Install python library. pip install pack

null 87 Dec 30, 2022
Aides to reduce a cheat file with a personal selection of the cheats you want to use.

Retroarch Cheat File Reducer Description Aides to reduce a cheat file with a personal selection of the cheats you want to use. Instructions Copy a sel

null 1 Jan 9, 2022