twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
994 stars 61 forks source link

[BUG] Plotting with R not working #361

Open ndombrowski opened 1 month ago

ndombrowski commented 1 month ago

Describe the bug I am running some R code and printing works completely fine but I seem unable to generate plots.

Software Version I am running Obsidian 1.6.2 on Windows 11 and use the WLS2/Ubuntu 20.04.6 option with the plugin version 1.12.0.

To Reproduce

As an example, I tried running the following:

y = c(1,2,3,4)
x = 1:length(y)

plot(x,y)

This code returns "Error in plot.new(): could not open file 'C:/Users/xx/AppData/Local/Temp/temp_1717854434076.png'". I don't see the image appearing in the mentioned folder.

Otherwise, I can run the R code fine using the plugin and I can for example print variables. In case its useful, I can successfully generate plots in python.

Many thanks for any input and thanks for the great plugin!