killiansheriff / LovelyPlots

Matplotlib style sheets to nicely format figures for scientific papers, thesis and presentations while keeping them fully editable in Adobe Illustrator.
MIT License
848 stars 34 forks source link

imshow #3

Closed danchitnis closed 2 years ago

danchitnis commented 2 years ago

Well done for creating this library and getting it compatible with Adobe Illustrator (spent too many hours of my life fixing figures!). Are you planning to expand on other plots like imshow? It does export correctly, but color scheme doesn't seem to change. Also, you may need color schemes which are appropriate for showing linear gradient changes, like heat maps, Matlab's jet, etc.

killiansheriff commented 2 years ago

Hi Danial, thanks for your message and the great suggestions!

The imshow color scheme is not changing because it uses color maps and not color cycles. I have added a few color maps: cmap-viridis, cmap-inferno, cmap-cividis, cmap-magma and cmap-plasma. You can use them by appending them to the ipynb style: plt.style.use(['ipynb','cmap-viridis']).

You will need to run pip install lovelyplots --upgrade for the new styles to be available.

Please let me know if this solves your issue and don't hesitate to reach out if you want more features!

danchitnis commented 2 years ago

Thanks for updating. I tested imshow, and it exported the SVG correctly to Illustrator. I also tried bar, and it worked correctly too.