emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Denton <wtd@pobox.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Images generated by R code blocks do not display
Date: Wed, 23 Nov 2022 22:19:04 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2211232206300.89403@shell3.miskatonic.org> (raw)
In-Reply-To: <87sfi9awmy.fsf@localhost>

On 24 November 2022, Ihor Radchenko wrote:

>> The image should appear immediately in the buffer, shouldn't it?
>
> No, it should not.
> Though it is often requested.

Huh, strange.  It's always done it for me, at least with R code blocks, as far 
as I can remember.  But back to my original problem!

Here's another angle on it, with images not being refreshed even though they've 
changed.

Setup:  my minimal-init.el from my first email.

File, r.org:

# -----

#+begin_src R :results graphics file :file /tmp/plot.png :width 300 :height 300
plot(c(1, 2, 3, 4), c(1, 8, 27, 64))
#+end_src

# -----

Steps:

+ C-x C-f (load r.org)
+ C-c C-c (execute R block)
+ answer yes to "Evaluate this?" question
+ #RESULTS appears, but image doesn't show
+ C-c C-x C-v (to see image)
+ look at /tmp/plot.png: it is 300 x 300
+ edit width and height settings so they are each 500 pixels
+ C-c C-c (execute R block again)
+ answer yes to "Evaluate this?" question
+ image disappears
+ C-c C-x C-v (to see image)
+ image is still 300 pixels square! 
+ look at /tmp/plot.png: it is 500 x 500
+ C-x C-s (save file r.org)
+ quit and restart Emacs with minimal init
+ C-x C-f (load r.org)
+ C-c C-x C-v (to see image)
+ image is 500 x 500!

So R is generating a new, larger image, and it's there on disk, but Emacs won't 
show it.

Thanks again,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada


  reply	other threads:[~2022-11-24  3:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 21:18 Images generated by R code blocks do not display William Denton
2022-11-24  2:19 ` Ihor Radchenko
2022-11-24  2:46   ` William Denton
2022-11-24  2:56     ` Ihor Radchenko
2022-11-24  3:19       ` William Denton [this message]
2022-11-24  3:24         ` Ihor Radchenko
2022-11-24  3:29           ` William Denton
2022-11-24  3:43             ` Ihor Radchenko
2022-11-24  4:11               ` William Denton
2022-11-25  2:03                 ` Ihor Radchenko
2022-11-27 13:18                   ` Jeremie Juste
2022-11-27 13:21                     ` Ihor Radchenko
2022-11-27 14:16                       ` Jeremie Juste
2022-11-28 20:44                   ` William Denton
2022-11-29  4:16                     ` William Denton
2022-12-08 11:19                     ` Ihor Radchenko
2022-12-08 15:37                       ` William Denton
2022-12-10 10:04                       ` Ihor Radchenko
2022-12-12  3:10                         ` William Denton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2211232206300.89403@shell3.miskatonic.org \
    --to=wtd@pobox.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).