Skip to content

Functions for easily making publication-quality figures with matplotlib.

License

Notifications You must be signed in to change notification settings

csinva/data-viz-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data-viz utils 📈

Functions for data visualization in matplotlib

📚 API

Can be installed using pip install dvu and then imported with import dvu.

You can also just copy the relatively short source code for the functions (easily viewable here).

Helps create a bunch of different plots such as these:

One particularly useful function is dvu.line_legend() which replaces a typical matplotlib legend with labels for each line:

Using plt.legend() Using dvu.line_legend()
plt_legend dvu_legend

Another one is dvu.invert_plot() which can be called after generating a plot to invert everything besides the line colors

Original plot After dvu.invert_plot()
plt_legend dvu_legend

Reference