From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0ClkH1xAnmEh4AAAgWs5BA (envelope-from ) for ; Wed, 24 Nov 2021 14:38:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IGvrGlxAnmEPOQAAbx9fmQ (envelope-from ) for ; Wed, 24 Nov 2021 13:38:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 10AC77695 for ; Wed, 24 Nov 2021 14:38:36 +0100 (CET) Received: from localhost ([::1]:45762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpsTr-0008LQ-6x for larch@yhetil.org; Wed, 24 Nov 2021 08:38:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpsFi-0008TM-LP for emacs-orgmode@gnu.org; Wed, 24 Nov 2021 08:24:02 -0500 Received: from ciao.gmane.io ([116.202.254.214]:35396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpsFf-0007Vd-Dv for emacs-orgmode@gnu.org; Wed, 24 Nov 2021 08:23:57 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mpsFb-000ASz-CW for emacs-orgmode@gnu.org; Wed, 24 Nov 2021 14:23:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-orgmode@gnu.org To: emacs-orgmode@gnu.org From: Uwe Brauer Subject: matlab+kernel+jupyter+python: works nicely save the plot command Date: Wed, 24 Nov 2021 14:23:42 +0100 Message-ID: <87bl29wuu9.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:QUP8QY0ElVLhsCK8x+0YboD0nz8= Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637761116; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=NASQoOXpuU2pvr+v1D3WsiYiTae+xf/sjXMdynf1pmg=; b=QyByydke3H6feN2cec0Cz3AKfjf4qMYVPLZ1SaFj6qME1Wvk4bNjyzZRrdYPGJhQFhoUxp wVG/bcJtyQGSfd/JRhcwST6C4VUBGS5B8ML1JI8zrvKptdFo1t1Kl6NAic/QvH0xlq16/6 lCsECKBvKWUXmNQvcPGfBQg0bm2rdaiu5YEwAdUgxBRYmElFH/DgX9r1T2L3URHIsinXfj f2l5s+l5M+oqID55NP6NJbzBkJEjKr4VPPOrQ/HPh2B5bf15QgnB7eXV9c0MefNTzUTQIZ DJtdGPashF52/sKu+PKfmGOm5Et+UfL2Fe26WcfGD97pXvUE7n8MD/tmglUKsw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637761116; a=rsa-sha256; cv=none; b=XB2gbdkBGV/PkmQXNjf2wzAWYC2hlS3h9SEMW5lQbHTAm4+4jmjdXLiVI+E8Uzfa04hXE0 0w+7Hjux4+jd7mK2tmobaQQFBa2SX3p6SLQFD7Ku+DhV0dYTMtdbVQXXoWZF/0qFViKnJ9 MEaxIuvraRGNTR0SCMCzHRNX8ROORU4iT4Trr8Jb7UHinu0pcsIqMkIcihkqYE2thjSk8m bevtQ0taqa6BJUmF9KQm6vHfPvVMv1Y8NfkdORBbJl72Zlu7yZiu9yqwTqQRFQ8UU+Eqzi BO4hu1uLdxkeAPpzheKcgYYX9OXDjWVedxgBhJgr4j8EsOovT/L11FmLDXln6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=mat.ucm.es (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=mat.ucm.es (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 10AC77695 X-Spam-Score: -2.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5uQT0d2vLY6F Hi Using Ubuntu, python 3.5 matlab 2019a and the python matlab kernel mathworks provides (and ob-ipython, but I presume that scimax (https://github.com/jkitchin/scimax) and https://github.com/nnicandro/emacs-jupyter would behave similar. After starting the python-matlab engine I do #+BEGIN_SRC emacs-lisp (setq org-confirm-babel-evaluate nil) ;;; display/update images in the buffer after I evaluate (add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append) (add-to-list 'org-src-lang-modes '("matlab" . matlab)) (setq python-shell-interpreter "python3") ;; set default headers for convenience (setq org-babel-default-header-args:matlab '((:results . "output replace") (:session . "matlab") (:kernel . "matlab") (:exports . "code") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no"))) (defalias 'org-babel-execute:matlab 'org-babel-execute:ipython) (defalias 'org-babel-prep-session:matlab 'org-babel-prep-session:ipython) (defalias 'org-babel-matlab-initiate-session 'org-babel-ipython-initiate-session) #+END_SRC #+begin_src matlab :results output latex :exports code :eval never-export :wrap latex clear all close all t=[0:0.1:1]; y=sin(t); plot(t,y) print -dpng simple.png #+end_src The print command succeeds the simple.png file is generated, however I cannot see the figure with the plot, it never pops up. What is wrong in my setting? Regards Uwe Brauer