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

Isospace Plot Output Axis #339

Closed
mjeanfin opened this issue Apr 5, 2023 · 0 comments
Closed

Isospace Plot Output Axis #339

mjeanfin opened this issue Apr 5, 2023 · 0 comments

Comments

@mjeanfin
Copy link

mjeanfin commented Apr 5, 2023

Hello,

I am trying to use a MixSIAR figure for a poster and one of my committee members has a problem with the x and y axsis intervals of the isospace plot. I have modified the ggplot object as posted in #220 and #222 but cant find a way to set axis limits or modify them in any way. I'm still very new at R so I might have missed something.

Load mix data

mix.filename <- file.path("C:/Users/miche/OneDrive/Documents/MixSIAR Plots 04022023/Plot_Site_Habitat_BR/Consumer_Data_Sheet_2020.csv")

mix <- load_mix_data(filename=mix.filename,
iso_names=c("d13C","d15N"),
factors="Taxa",
fac_random=FALSE,
fac_nested=FALSE,
cont_effects=NULL)

Load source data

source.filename <- file.path("C:/Users/miche/OneDrive/Documents/MixSIAR Plots 04022023/Plot_Site_Habitat_BR/BR_Habitat_Source.csv")
source <- load_source_data(filename=source.filename,
source_factors=NULL,
conc_dep=FALSE,
data_type="raw",
mix)

Load discrimination/TDF data

discr.filename <- file.path("C:/Users/miche/OneDrive/Documents/MixSIAR Plots 04022023/Plot_Site_Habitat_BR/BR_TEF.csv")
discr <- load_discr_data(filename=discr.filename, mix)

Make isospace plot

plot_data(filename="isospace_plot_Fish2020_BR_04042023",
plot_save_pdf=FALSE,
plot_save_png=TRUE,
mix,source,discr,
return_obj=F)

new, returns ggplot object

g = plot_data(filename="isospace_plot_Fish2020_BR_04042023_gg", plot_save_pdf=F, plot_save_png=F, mix,source,discr, return_obj=T)

now modify plot using ggplot2 commands

png("isospace_plot_Fish2020_BR_04042023_gg.png",width=7, height=7, units="in", res=300)
g + theme(panel.border = element_blank(), panel.background = element_blank(),
panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
axis.line = element_line(colour = "black"),
axis.title=element_text(size=20), axis.text=element_text(size=14),
legend.text=element_text(size=12), legend.title=element_text(size=14))
dev.off()

@mjeanfin mjeanfin closed this as completed Apr 6, 2023
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

1 participant