From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id AOJiGj+wYGY0PAAAA41jLg (envelope-from ) for ; Wed, 05 Jun 2024 20:36:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cIa6Ej+wYGZKJQEA62LTzQ (envelope-from ) for ; Wed, 05 Jun 2024 20:36:47 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oP4BiAux; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717612607; a=rsa-sha256; cv=none; b=Ls3qfLPK6Pfgzvy3oPV7pmQFIYZeHJzl1bGyffaE+z+cJ9j2hdUPIyUItnVt+WMQlM/SDz nDo0NDw3i3hiHHcI/8U65XasaJrpYLGRxwXQ22L0F8MqZmAEs77ydtUbFXZwHlDS/EeJ9M DOvvHIobd565nerWwLH2cSx0x7pBz8uv1ARwivjUdfeLsxKAdhoCzqL/1KJFaXpYEEl3MJ BFcq6qjBsHbRodPcLtjI8OVxHHLXLWtD3vR07qXaNauDQece1S9vmjcvfTZ9j5DGmxf6ga TwAqiQvEh3QXjkeDbbMhKdrF0WVrnzlREI21po3nQDIzT9Y5SJBNu6ovZHXFxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oP4BiAux; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717612607; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FEndEFEYtyjbJdnUmC2jXoNKQEYCxC4SEZcoc8eao3w=; b=Yne1PRi9oprnk8lbY+L/BwNnrojyPLsr38mMv+DylouM/FGTn5svTbs7IU1bnQwocyRSuJ Z4EZc5QmllzZQwYPISVlKhVTWm4yW9YEMz2kywk9B3HaRnlguO65OF6xCzMU1xxra2Uv+C lAQmH/sBPK9YvRUmM6/d64cNolfrdopPC3Grw57N7nB/FmwxiarUsX0338trcpf9siVx/L JfOiCdk0QUO6+bp8wH1tCgXt7x5XdK3K/0/mRz9YHjNx0iN5WMhfqdhENi3Ec9A8CHhHGg yAQVYZA09RCsJ12xrHBpl4qgmOICwNfbal3m5oiZ+qmg2UFqQPL7UokQhiQsUQ== 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 27E12326EE for ; Wed, 5 Jun 2024 20:36:46 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEvUG-0003Yl-Mu; Wed, 05 Jun 2024 14:35:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEvUF-0003YV-BP for emacs-orgmode@gnu.org; Wed, 05 Jun 2024 14:35:51 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEvUB-0005mu-SO for emacs-orgmode@gnu.org; Wed, 05 Jun 2024 14:35:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EBBE6240027 for ; Wed, 5 Jun 2024 20:35:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1717612545; bh=hTKnL3oyTDZrXs907iVE9jCOuJ9oF53MrYkWNkP0Hf8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=oP4BiAuxFM17klmGMQklMFAzR7kvQkCxt+kgpFi4y6krcw5HgX/eYBGlvm9CKoToi Qyp6wKN4eV9nvGAbfLA5cKiadhuFYAuGyAs68MjKaysSJeVOREnSaAkdDmjaQS7XrM CdUiAw5uPAAuFw9FtacpvCx4Xl/+T4fpkp640HLq1DRiIheCTnoUjvqFTRjlG5LECf RmRUNGXdkgKiESo9i+gZbrdrkzUas0XM5AYHNi6UCLCKDXR84VABRX1aaxprOBv367 sVEFatd7CDH2yf90ca5A2sC6CID+qKprK1bfkmc4eKC5w7zeg3f0gxDabnE6xj5/wH 2XqXUa9CEo5fg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VvbkS237mz6twn; Wed, 5 Jun 2024 20:35:44 +0200 (CEST) From: Ihor Radchenko To: Giuseppe Pagnoni Cc: emacs-orgmode@gnu.org Subject: Re: Output of R code block: only text or plot but not both? And only one "result" can be output? In-Reply-To: References: Date: Wed, 05 Jun 2024 18:37:27 +0000 Message-ID: <87a5jz5j88.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 27E12326EE X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.22 X-Spam-Score: -8.22 X-TUID: f/SIHPJeF72s Giuseppe Pagnoni writes: > #+begin_src R :file example.png :results output graphics file > x <- rnorm(100) > print(mean(x)) > hist(x) > hist(x^2) > #+end_src > > Here, only the last plot gets displayed. Is it not possible to display > more than 1 plot? We currently do not have automatic way to do it, so that the resulting plots are inserted as previewable file links. However, in addition to the approach with several :session source blocks proposed by Berry, you can do it by hand in R: #+begin_src R :results output raw drawer :dir ./ x <- rnorm(100) print(mean(x)) png(file="hist1.png") hist(x) png(file="hist2.png") hist(x^2) print("[[./hist1.png]]") print("[[./hist2.png]]") #+end_src -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at