AustralianAntarcticDivision / SOmap

Southern Ocean round maps
https://australianantarcticdivision.github.io/SOmap/
24 stars 6 forks source link

Make par() reset after printing #27

Closed Maschette closed 5 years ago

Maschette commented 5 years ago

Currently we alter whilst we are plotting and it remains set with those changes. If you run print over and over then par("mar") gets halved with each run. A better option may be to give par set values to begin with and use something like:

op <- par(bg = "gray21", col = "deeppink", col.axis = "deeppink") on.exit(par(op))

mdsumner commented 5 years ago

I removed the on.exit calls because that leaves us unable to overplot when they include figure size (I guess?). Setting a absolute mar each time may be the solution here, though - the details confuse me

Maschette commented 5 years ago

Super fair I didnt mean to push it in the first place