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

FileNotFoundError: [Errno 2] No such file or directory: 'ipynb' #9

Closed baogiadoan closed 7 months ago

baogiadoan commented 8 months ago

I followed the installation instruction. However, when I use: plt.style.use('ipynb')

then I faced with the error:

FileNotFoundError: [Errno 2] No such file or directory: 'ipynb'

Here is the available style when I use command plt.style.available:

['Solarize_Light2',
 '_classic_test_patch',
 '_mpl-gallery',
 '_mpl-gallery-nogrid',
 'bmh',
 'classic',
 'dark_background',
 'fast',
 'fivethirtyeight',
 'ggplot',
 'grayscale',
 'seaborn-v0_8',
 'seaborn-v0_8-bright',
 'seaborn-v0_8-colorblind',
 'seaborn-v0_8-dark',
 'seaborn-v0_8-dark-palette',
 'seaborn-v0_8-darkgrid',
 'seaborn-v0_8-deep',
 'seaborn-v0_8-muted',
 'seaborn-v0_8-notebook',
 'seaborn-v0_8-paper',
 'seaborn-v0_8-pastel',
 'seaborn-v0_8-poster',
 'seaborn-v0_8-talk',
 'seaborn-v0_8-ticks',
 'seaborn-v0_8-white',
 'seaborn-v0_8-whitegrid',
 'tableau-colorblind10']

I use conda to manage virtual envs and the env I installed LovelyPlots is the same as for the kernel that I run my Jupyter.

killiansheriff commented 8 months ago

Hi -- thanks for noticing this!

Can you try adding import lovelyplots on top of your script? There might have been a matplotlib update that now requires to import the module.

baogiadoan commented 8 months ago

thanks for your quick response, after import LovelyPlots I still faced the same error

killiansheriff commented 8 months ago

Can you try installing the latest git commit with pip install --upgrade git+https://github.com/killiansheriff/LovelyPlots.git?

And then run:

import lovelyplots 
import matplotlib.pyplot as plt 

plt.style.use('ipynb')
baogiadoan commented 8 months ago

sorry, the issue is not solved after I installed from git as above

On Tue, 5 Mar 2024 at 15:49, Killian Sheriff @.***> wrote:

Can you try the installing the latest git commit with pip install --upgrade git+https://github.com/killiansheriff/LovelyPlots.git?

And then run:

import lovelyplots import matplotlib.pyplot as plt plt.style.use('ipynb')

— Reply to this email directly, view it on GitHub https://github.com/killiansheriff/LovelyPlots/issues/9#issuecomment-1977986282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFZFNGN3CZSL5N2PG5NPC3YWVIU5AVCNFSM6AAAAABEGMB3N2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXHE4DMMRYGI . You are receiving this because you authored the thread.Message ID: @.***>

-- Best regards, Bao

baogiadoan commented 8 months ago

can you replicate the issue at your end @killiansheriff ?

killiansheriff commented 7 months ago

Should be fixed in the latest release! Let me know if it works fine now. Thanks!

baogiadoan commented 7 months ago

yes, I can confirm it is working now, thanks for you prompt action.