scimax icon indicating copy to clipboard operation
scimax copied to clipboard

matplotlib figures not showing

Open uliw opened this issue 4 years ago • 6 comments

The following code will produce no output:

#+BEGIN_SRC ipython
import matplotlib.pyplot as plt
Age=[1,2,3,6]
d34S=[12, 23, 0, 4]
plt.scatter(Age,d34S) 
plt.show()
#+END_SRC

this used to work, but some update must have broken it. I'd be grateful for any hints how to debug this

uliw avatar Nov 18 '21 17:11 uliw

I don't think that is an update from me, I haven't changed the ipython code in a long time. In my current setup I still see a plot.

jkitchin avatar Nov 18 '21 18:11 jkitchin

ok. would you have any idea how to dig into this?

On Thu, Nov 18, 2021 at 1:04 PM John Kitchin @.***> wrote:

I don't think that is an update from me, I haven't changed the ipython code in a long time. In my current setup I still see a plot.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jkitchin/scimax/issues/437#issuecomment-973123517, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWSVAXYESLIV4K3TRMJACTUMU523ANCNFSM5IKFPIFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Ulrich G. Wortmann https://www.es.utoronto.ca/people/faculty/wortmann-ulrich/ Dept. of Earth Sciences Fax : 416 978 3938 University of Toronto Phone: 416 978 7084 22 Ursula Franklin Street, Toronto, ON, Canada M5S 3B1

uliw avatar Nov 18 '21 18:11 uliw

I tried running this in a fresh install of scimax, and it does show the plots.

When you start up emacs, do you see anything in the Messages that would indicate a problem?

Is there anything in the *ob-ipython... buffers?

jkitchin avatar Nov 19 '21 13:11 jkitchin

It works with emacs 27.2. With emacs 28.0.60 I get lot's of deprecation warnings on startup, and the following error:

Error (use-package): scimax-org-babel-ipython-upstream/:catch: Wrong type argument: char-or-string-p, ("Execute" ["Current block" org-ctrl-c-ctrl-c t] ["Current and next" scimax-execute-and-next-block t] ["To point" scimax-execute-to-point t] ["Restart/block" scimax-ob-ipython-restart-kernel-execute-block t] ["Restart/to point" scimax-restart-ipython-and-execute-to-point t] ["Restart/buffer" scimax-ob-ipython-restart-kernel-execute-buffer t])

uliw avatar Nov 19 '21 15:11 uliw

I guess this is related to issue #426, and a commit there. It looks like the menu code may have changed? That code isn't real critical I suppose, you might fix it with

(setq ob-ipython-menu-items nil) in preload.el

jkitchin avatar Nov 19 '21 19:11 jkitchin

yea, that looks like the same thing. For now, I will fall back to 27.2 but will try with 29, and check if the error persists.

On Fri, Nov 19, 2021 at 2:29 PM John Kitchin @.***> wrote:

I guess this is related to issue #426 https://github.com/jkitchin/scimax/issues/426, and a commit there. It looks like the menu code may have changed? That code isn't real critical I suppose, you might fix it with

(setq ob-ipython-menu-items nil) in preload.el

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jkitchin/scimax/issues/437#issuecomment-974351128, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWSVASJSRF7KQLHKOPY7IDUM2QRDANCNFSM5IKFPIFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Ulrich G. Wortmann https://www.es.utoronto.ca/people/faculty/wortmann-ulrich/ Dept. of Earth Sciences Fax : 416 978 3938 University of Toronto Phone: 416 978 7084 22 Ursula Franklin Street, Toronto, ON, Canada M5S 3B1

uliw avatar Nov 19 '21 20:11 uliw

I am going to deprecate the ob-ipython code in scimax some time this year.

jkitchin avatar Apr 27 '23 13:04 jkitchin