-
Notifications
You must be signed in to change notification settings - Fork 75
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
Error in plot_prior #356
Comments
I am having the same issue using R version 4.3.1 in RStudio version 2023.09.0+463 on Mac OS 14 |
RStudio can have problems with graphics. Have you tried running outside
RStudio?
…On Tue, Oct 17, 2023, 7:27 PM DSchimmenti ***@***.***> wrote:
I am having the same issue using R version 4.3.1 in RStudio version
2023.09.0+463 on Mac OS 14
—
Reply to this email directly, view it on GitHub
<#356 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHDA46RJYFO4KD74HFJFM3X725XFAVCNFSM6AAAAAA4IANQ4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRWHA2TSNRWGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Have you got it to work? Turning the dev.off, uninstalling and reinstalling did not help either. Also ran code in an RMD file & it did not work either. |
I have not yet. Will be trying Visual Studio or maybe anaconda. Was told to try R's native GUI as well. |
R's GUI is throwing the same error as Rstudio was. |
I've tried running outside of RStudio in base R and I'm running into the same issue. I still get the "Error in plot.new() : figure margins too large" error message similar to @Coastal-Keith above |
I have attempted plotting the priors for a different set of data with 5 sources, and R produced the plot without giving me that error message. The dataset I am running into the error with has 11 sources, so I wonder if that is the issue- when you have larger numbers of sources? |
I still haven't gotten it work. Have you gotten yours to work with all 11 sources? I also have a larger number of sources. |
Hello mixing friends, I was running into the same problem and just got it to work. The number of sources before combining can just be too many to fit on the screen displaying the graphics device created by the combine_sources function. So, I copied and pasted the function code from here on GitHub into a new R script file, and changed line 197 from dev.new() to now be pdf("file_name.pdf", width = 10, height = 20).
You'll want to rename the function so it doesn't conflict, and use the source function to call it into your environment. I changed the function name to combine_sources2, and named the R file the same. In my analysis script I ran the following:
Now I get a PDF file of the prior plot without it stopping the whole process due to plot size. I hope this helps for anyone still struggling with this! |
Analyzing 2 isotope tracers in a source contribution study.
When I run code to run the mixSIAR model, I get an error code for the code block "plot_prior(alpha.prior = 1, source)". Error reads "Error in plot.new() : figure margins too large". The model will continue & successfully run, but no files are saved to my working directory with no evidence that I ran the model.
Things I've done to try to fix the error.
Reduced figure margin sizes using "par(mar = c(1,1,1,1))"
Increase plot window size.
Save figures as PDF.
R.version 4.2.2
Windows 10, 64-bit
The text was updated successfully, but these errors were encountered: