Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save files #2

Open
td296 opened this issue Oct 2, 2024 · 1 comment
Open

Save files #2

td296 opened this issue Oct 2, 2024 · 1 comment

Comments

@td296
Copy link

td296 commented Oct 2, 2024

Hi Eric,

We were wondering how to save files in TIFF format for high resolution plots. We have ahd a look through the code and can't find where this can be done. We have tried to load the R file from the output data file but this produced plots with erroneous map margins and legend size.

Cheers

Toby

Screenshot (134)

@etd530
Copy link
Owner

etd530 commented Oct 19, 2024

Hi Tobby,

I could modify the code to allow output as TIFF, but doing it properly may take me a bit. However, have you tried opening the PDF in Illustrator/Inkscape/GIMP and exporting to PNG/TIFF? We chose to output as PDF by default because it can easily be edited in Illustator/Inkscape so you can edit, the axes, etc. to your liking.

Illustrator can output as TIFF; Inkscape cannot but you can output as PNG and then as TIFF by opening in GIMP. I think this way you should be able to have as much resolution as you want since PDF is vectorial.

Regarding your error, what did you try exactly? I managed to output as TIFF by doing:

load("yourfilename.RData) # load RData output from your hysplit run
opt <- list(run_id = 1) # generate mock opt object
tiff(filename="yourfilename.tiff", res =300, width = 5000, height = 5000, units = "px) # adjust graphical parameters to your taste
lapply(X=trajs, FUN = plot_trajlines, PRJ = PRJ) # this line from the program plots the trajectories
dev.off()

But this will be a bit cumbersome if you have to run many figures.

Let me know if any of this options works for you,

Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants