hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
311 stars 60 forks source link

python notebooks and matplotlib inline #159

Closed lrhgit closed 6 years ago

lrhgit commented 6 years ago

test.do.txt with content

!bc pycode import matplotlib !ec

yields after doconce format ipynb test.do.txt

%matplotlib inline import matplotlib

in the resulting notebook. That is %matplotlib inline is auto-included before any 'import matplotlib'. For certain notebooks with ipwidgets this causes problems.

Q: Is there any ways to avoid the auto-inclusion of the %matplotlib inline?

KGHustad commented 6 years ago

I just added an option --ipynb_disable_mpl_inline, which will disable the automatic insertion of %matplotlib inline before the first line where matplotlib is imported.

lrhgit commented 6 years ago

Takk skal du ha Kristian. Supert. Godt jobba.

lr

From: Kristian Gregorius Hustad notifications@github.com Reply-To: hplgit/doconce reply@reply.github.com Date: Tuesday, 15 May 2018 at 01:13 To: hplgit/doconce doconce@noreply.github.com Cc: Leif Rune Hellevik leif.r.hellevik@ntnu.no, Author author@noreply.github.com Subject: Re: [hplgit/doconce] python notebooks and matplotlib inline (#159)

I just added an option --ipynb_disable_mpl_inline, which will disable the automatic insertion of %matplotlib inline before the first line where matplotlib is imported.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/hplgit/doconce/issues/159#issuecomment-388991808, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGVgUgBNjdRVdd8WGkwr5RBcmxOet_40ks5tyg95gaJpZM4T7Wkt.