Giter Site home page Giter Site logo

Reset par on clear about httpgd HOT 4 CLOSED

nx10 avatar nx10 commented on August 24, 2024
Reset par on clear

from httpgd.

Comments (4)

nx10 avatar nx10 commented on August 24, 2024 1

Thank you for waiting patiently. I just added a parameter

hgd(
  ... ,
  reset_par = getOption("httpgd.reset_par", FALSE)
)

that toggles this functionality.

from httpgd.

nx10 avatar nx10 commented on August 24, 2024

The "clean" button in RStudio kills the graphics device which results in par being reset.
This seems to be the recommended way of resetting par (https://stackoverflow.com/questions/5789982/reset-par-to-the-default-values-at-startup).
In httpgd this would mean that the webserver had to be shut down and restarted, which I think we should avoid.
Do you shink we should make a copy of the par arguments as suggested by the second answer of the stackoverflow link:

opar <- par() # on startup
# ...
par(opar) # on "clean"

Or is resetting the mfrow argument after clean sufficient?

par(mfrow = c(1, 1))

I am not exactly sure what other settings of par are commonly used.

from httpgd.

MrJGao avatar MrJGao commented on August 24, 2024

This is an old session, but I do think it's more convenient if there's a button or command to reset the par. Is it possible to save a default par object when startup and add a button on the toolbar of the plot window to reset par? if that's easier than killing the server and restarting it. Thanks.

from httpgd.

nx10 avatar nx10 commented on August 24, 2024

Thank you for your request, I agree and have added it to the 1.3 tracking issue.

from httpgd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.