kshotwell / AKesp

Automating ESPs for the Alaska Fisheries Science Center
https://kshotwell.github.io/AKesp/
Other
10 stars 1 forks source link

space in time series figures #7

Open kshotwell opened 2 years ago

kshotwell commented 2 years ago

Is there any way to reduce the space between where the units are show and the time series graphic? In the rendered report card documents the units take up 1/3 of the page so makes it difficult to see the time series. see attached example bbrkc_2022_rc.docx

kshotwell commented 2 years ago

Oh, also, in the attached there are some random errant figures that keep popping up and they are really scrunched time series graphics. They are being inserted at various parts throughout the document. any thoughts on why?

atyrell3 commented 2 years ago

Regarding the space on the y axis -- yes, I can change that, it's an artifact of the hack-y method I threw together to get the units on the y-axis. There's some trial and error in getting the spacing right. You can see how I manually specify the spacing in line 210 here. I just reduced it a bit, let me know if it's looking better.

The random figures -- I don't know why it's happening, but I remember noticing that the last time I was working on the package. I think it might be an R Studio bug? I haven't updated to the newest version yet. It seems more likely happen if I have a figure displayed in the viewer in R Studio, so clearing those out may help. Sorry I don't have a good fix for that!

kshotwell commented 2 years ago

Thank you for all this info! Ok, I updated and the internal space between the unit legend and the y-axis looks great. Nice work! I can see that may be more of a guessing game as the y-axis values can expand and then it will run into those labels very easily. I bet the groundfish data labels were bigger than the crab data and so it looked odd. So will have to just manipulate that line of code according to the data. There's also a bunch of added space on the left outside boundary of the graphic. This is fixable within word by just cropping the left side of the image, but any thoughts on how to reduce that?