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

Warning: Missing Elements #12

Closed
alexilliamson opened this issue Jan 26, 2017 · 6 comments
Closed

Warning: Missing Elements #12

alexilliamson opened this issue Jan 26, 2017 · 6 comments

Comments

@alexilliamson
Copy link

Everytime I load a theme with gthemr() it warns as below:

panel.margin is deprecated. Please use panel.spacing property insteadlegend.margin must be specified using margin(). For the old behavior use legend.spacingNew theme missing the following elements: axis.title.x.top, axis.title.y.right, axis.text.x.top, axis.text.y.right, legend.spacing.x, legend.spacing.y, legend.box.margin, legend.box.background, legend.box.spacing, panel.spacing.x, panel.spacing.y, plot.subtitle, plot.caption, strip.placement.

Can these missing elements be defaulted so that this warning stops appearing?

@sainathadapa
Copy link
Collaborator

Can you give a reproducible example along with output from sessionInfo()

@alexilliamson
Copy link
Author

My apologies, I'm pretty new to this. Below is the example that produces the warning described in my first comment. sessionInfo() is also included. Thanks immensely!

> library(ggplot2)
> library(ggthemr)
> ggthemr("pale", spacing = 2)
Warning messages:
1: `panel.margin` is deprecated. Please use `panel.spacing` property instead 
2: `legend.margin` must be specified using `margin()`. For the old behavior use legend.spacing 
3: New theme missing the following elements: axis.title.x.top, axis.title.y.right, axis.text.x.top, axis.text.y.right, legend.spacing.x, legend.spacing.y, legend.box.margin, legend.box.background, legend.box.spacing, panel.spacing.x, panel.spacing.y, plot.subtitle, plot.caption, strip.placement 
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggthemr_1.0.2      ggplot2_2.1.0.9001

loaded via a namespace (and not attached):
 [1] colorspace_1.2-7  scales_0.4.0.9003 lazyeval_0.2.0    plyr_1.8.4        assertthat_0.1    tools_3.3.0       gtable_0.2.0     
 [8] tibble_1.2        Rcpp_0.12.7       grid_3.3.0        munsell_0.4.3    

@sainathadapa
Copy link
Collaborator

I don't see any issues on my side. You are using a older version of ggplot2. Can you upgrade it to the latest stable version, 2.2.1 and check? Here is my sessionInfo():

> library(ggplot2)
> library(ggthemr)
> ggthemr("pale", spacing = 2)
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggthemr_1.0.2 ggplot2_2.2.1

loaded via a namespace (and not attached):
 [1] colorspace_1.3-2 scales_0.4.1     assertthat_0.1   lazyeval_0.2.0   plyr_1.8.4       tools_3.3.2      gtable_0.2.0     tibble_1.2      
 [9] Rcpp_0.12.9      grid_3.3.2       munsell_0.4.3   

@alexilliamson
Copy link
Author

I updated ggplot2 and I am still seeing that same warning:

> library(ggplot2)

> library(ggthemr)

> ggthemr("pale", spacing = 2)

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggthemr_1.0.2 ggplot2_2.2.1

loaded via a namespace (and not attached):
 [1] colorspace_1.2-7 scales_0.4.1     assertthat_0.1   lazyeval_0.2.0   plyr_1.8.4       tools_3.3.0      gtable_0.2.0     tibble_1.2      
 [9] Rcpp_0.12.7      grid_3.3.0       munsell_0.4.3   
Warning messages:
1: R graphics engine version 11 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed. 
2: package ‘ggplot2’ was built under R version 3.3.2 
3: `panel.margin` is deprecated. Please use `panel.spacing` property instead 
4: `legend.margin` must be specified using `margin()`. For the old behavior use legend.spacing 
5: New theme missing the following elements: axis.title.x.top, axis.title.y.right, axis.text.x.top, axis.text.y.right, legend.spacing.x, legend.spacing.y, legend.box.margin, legend.box.background, legend.box.spacing, panel.spacing.x, panel.spacing.y, plot.subtitle, plot.caption, strip.placement

@sainathadapa
Copy link
Collaborator

Can you re-install the ggthemr? You may have an older version. Also, seems like you need to upgrade RStudio as well.

@alexilliamson
Copy link
Author

I re-installed ggthemr and the warning went away. Waiting for admin approval at work to update RStudio :-/.

Thanks for your help!

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