Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Inline plots don't always work #59

Closed
milan338 opened this issue Sep 20, 2022 · 2 comments
Closed

[BUG] Inline plots don't always work #59

milan338 opened this issue Sep 20, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@milan338
Copy link
Collaborator

When using R for example,

library(datasets)
data(mtcars)
boxplot(mtcars$mpg, col="green")

does not work, throwing the error could not find function "boxpng". I suspect this is because of the implementation in Magic.ts where it uses the regex /plot\(.*\)/g to capture everything with plot and replaces it with a call to png, however like in this example, this doesn't always work. It looks like the inline plots will only work specifically for calls to plot(), and Python is similarly limited to only plt.show().

@twibiral twibiral added the bug Something isn't working label Sep 20, 2022
@zcysxy
Copy link

zcysxy commented Sep 20, 2022

Similar error when using ggplot2:

Error in ggpng("/var/folders/kt/8542mdzd03q6v0r_k8n155kc0000gn/T/temp_1663699433172.png") : 
  could not find function "ggpng"
Execution halted

@twibiral
Copy link
Owner

twibiral commented Sep 20, 2022

This is fixed by release 0.15.1. The fix should be improved by future updates as it only supports normal plots at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants