How to reset all the parameter in R

r

#1

I have used to par argument to color my plot but after creating the plot of that I want to get my previous plot by not changing argument color in function par .
for example.
par(col=“red”)
plot(x,y)
I do not want to change like this par(col=“black”) like previous plot .I want to know this because in code it is very difficult to change parameters manually.Please help


#2

@sid100158 - you can store the par values in a variable and then change the corresponding color and other attributes and then call that variable again when you reset all parameter.

a<-par()
then apply the par(col=“red”)
and call the a variable when you want to reset

Hope this help