Skip to content

Disable show plot  #277

Closed
Closed

Description

@Nightwingg

Hello, first of all, thank you very much for developing this wonderful extension.

Question: Is there any way to disable the display of the plot in the second vscode editor?

I'm asking because I prefer to view the graphs in an external editor.

Goodbye and thank you.

PD: Sorry I made a mistake, I should have tagged it as a feature request, now I can't change it.

Activity

  1. renkun-ken commented on Apr 5, 2020

    @renkun-ken
    Member

    If I understand your case correctly, do you mean you prefer to view the graphs at ${workspaceFolder}/.vscode/vscode-R/{pid}/plot.png in an external editor? So in your use case R session watcher still needs to produce the plot.png file but you don't want VSCode to open that file automatically whenever the file is updated?

  2. Nightwingg commented on Apr 5, 2020

    @Nightwingg
    Author

    No, I mean that whenever you plot, the second window with the graph opens:

    But I would prefer to disable that option (keeping all the other advantages of the session watcher) so that it is graphed in R's graphics window

    It is more comfortable since I can better handle the size of the graphics and it does not take up space in vscode.
    I hope it has been understood, and if it is viable.
    Cheers

  3. renkun-ken commented on Apr 5, 2020

    @renkun-ken
    Member

    I got it. You need an option to disable the graphics part of session watcher so that it does not record the plot to plot.png at all and you want the default plot window to show up just like the default behavior.

    This could be easily done with some options to disable graphics-related features from the session watcher init script. I'll take a look at this soon.

  4. jankolkmeier commented on Apr 21, 2020

    @jankolkmeier

    I support this. I also find the default plot.png popup quite useless as I cannot control it's resolution & aspect ratio (and the default resolution is very low)!

    For me I'd rather just use custom devices (i.e. png()) or ggsave to save a plot to a specific location at my desired resolution. If I open that .png in vscode manually (or sometimes I create .pdf's that I'm opening in an external viewer), it will also refresh when it gets updated (great!).

    This workflow is just interrupted currently, as plot.png gets created and loaded automatically each time (it happens once I call dev.off()).

  5. gowerc commented on May 23, 2020

    @gowerc
    Contributor

    @jankolkmeier & @Nightwingg , So the default behaviour in R would be to open up and display the plot on the default graphics device (Quartz on Mac). Would you want an option to disable the plot.png so that nothing at all appears or so that it goes back to the default R behaviour ?

    Personally I think we should have an option available to toggle between all 3 choices.

  6. Nightwingg commented on May 23, 2020

    @Nightwingg
    Author

    For me the best way this is left would be an additional option, type "r.plot.device": "none".
    Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions