From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EDsBIrX+RF9+FAAA0tVLHw (envelope-from ) for ; Tue, 25 Aug 2020 12:06:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +F3/HbX+RF+eCAAA1q6Kng (envelope-from ) for ; Tue, 25 Aug 2020 12:06:13 +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 E91D4940631 for ; Tue, 25 Aug 2020 12:06:12 +0000 (UTC) Received: from localhost ([::1]:52882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAXiM-00005J-Pd for larch@yhetil.org; Tue, 25 Aug 2020 08:06:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAXi3-00005A-F3 for emacs-orgmode@gnu.org; Tue, 25 Aug 2020 08:05:51 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:43798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAXi1-0003LR-Pc for emacs-orgmode@gnu.org; Tue, 25 Aug 2020 08:05:51 -0400 Received: by mail-wr1-x42e.google.com with SMTP id 2so1284807wrj.10 for ; Tue, 25 Aug 2020 05:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=ZEEHXLdW3ahUKVz03J5V3S+NJ0Ny5/ADr0LF1hRs9WQ=; b=rdbYKxb5M+Ip4bS7eT+Cca6NhmmsAm3D+xRS4VOkSgcrmAFiKSGFOO3AuPflKNPhg9 ELWxJK7VPxKLccRvrhozcKVBCN7KHIDHol8jBMmq0B+hhHbYKUJkTwyRDq4OEoWeD9eu zo6OONSy80AmLoQ9NmPQtEB/A/C7vKwS+fEIQrRBUk/glmORq3Qaku2jtaHNGSqXbBym UrCn5hJtEJ7M/rY0hoWdCVX4aqbIE67BiBI9eYr2bttYMAH//Bz6H8C9FJIZgODTdl3U 6kKpQuK8hf5XX+rjOLVoYheyVdQX8nPC+PDDxEp6mII4hGJeLC4GjK1v1yFU/u7MgRMj aUtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=ZEEHXLdW3ahUKVz03J5V3S+NJ0Ny5/ADr0LF1hRs9WQ=; b=oBd1cVL90MbTvv4te0OIY0TM3mCbHfUqIiPpCJ/dcF6jNuRQDfK69bUuLNr1oiYvpP BOQmHV51l2jU6aVNgsD7cEazaYSikbJ0dZUZJZz0DPBsFXw+keDtoTZWrZc9D9VQYJfO EvKEfeMCnPg16Wg5P06JoLizU5gjVNrP0csglZC0uZz55qE14duerPO8oKQyziq4Dxq0 NWrSFKtTEx8QgxWeZr78+n509/kf8qzDSO34xONBHgq+bMgKPhb7SMgNmVCbDPwOiwFM h2/I7pxfJ101RbkXP0FQY5HZLKq6crZDe+loicUpEK/x4H9Fk3C2W0RJUvbSGohEEta4 U4qA== X-Gm-Message-State: AOAM532q2gZ2/lUTW7+Tk5BATWxjbr28A9mkzeT9T6PeIE02x7OgphJl hJEe/tMF/olFW2GWA2+wGpXDdlMJPg8= X-Google-Smtp-Source: ABdhPJzkvmJUk/aXzLBJjXfi8BuvaBt4VIw0JcpmEReaoLhXfrBxFGmBUh1ZGKqqaUFDtYnAkm9Ekw== X-Received: by 2002:adf:f808:: with SMTP id s8mr3869343wrp.218.1598357147142; Tue, 25 Aug 2020 05:05:47 -0700 (PDT) Received: from freegnu (24.183.22.109.rev.sfr.net. [109.22.183.24]) by smtp.gmail.com with ESMTPSA id z6sm5546696wml.41.2020.08.25.05.05.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 05:05:46 -0700 (PDT) From: Jeremie Juste To: emacs-orgmode@gnu.org Subject: save plot in python babel Date: Tue, 25 Aug 2020 14:05:45 +0200 Message-ID: <87imd7ue06.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=jeremiejuste@gmail.com; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=rdbYKxb5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: ACVq+1eohWsF Hello, I've barely use python with org-mode and I would need some help with the python setup. I somehow have some trouble saving python plots. Is this the right way to do it? #+begin_src python :results output file link :file myfig1.pdf :session *Python* import matplotlib import numpy as np import matplotlib.pyplot as plt e_values = np.random.randn(100) plt.plot(e_values) #+end_src In R things seems to be smoother. #+begin_src R :results output graphics :file myfig1.pdf :session *R* plot(1) #+end_src I tried to look around and noticed that the documentation regarding python with org-mode is aging a bit and there are ob-* all over the place. [1] ob-ipython does not seem to be maintained, [2] ein on top of ob-python [1]: https://github.com/gregsexton/ob-ipython [2]: https://github.com/millejoh/emacs-ipython-notebook Any help will be appreciated. I'll be ready to improve the documentation of org-babel python setup as soon as I'm more familiar with it myself. Best regards, Jeremie