Code Monkey home page Code Monkey logo

wvplots's Introduction

wvplots's People

Contributors

angelfelizr avatar johnmount avatar ninazumel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wvplots's Issues

ScatterHistN returning NA values for y-axis when plotting PC

Hi,

I am not 100% sure whether this issue should fall under this repository or Examples/PCR/YAwarePCA.Rmd,
but I am having an issue with the ScatterHistN() function.

You're articles were highly informative and the graphs that you have generated are incredibly helpful in allowing me to understand and explain the PCAs that I am working on. I ran across this issue when trying the y-scaled PCA for my data set. I thought it might have been just my dataset so I copied the entire script from Examples/PCR/YAwarePCA.Rmd and got the same problem.

When I get to the step:
`# apply projection
projectedTrain <- as.data.frame(dmTrain %*% proj,
stringsAsFactors = FALSE)

plot data sorted by principal components

projectedTrain$y <- dTrainNTreatedYScaled$y
ScatterHistN(projectedTrain,'PC1','PC2','y',
"Y-Scaled Training Data projected to first two principal components")`

This is the graph that is produced on my system:
scatterhistn issue

For some reason, no matter which PC i put as the "yvar" arguement, it returns the following warnings:
Warning messages:
1: In max(nchar(c(origlabs1, origlabs2))) :
no non-missing arguments to max; returning -Inf
2: In stri_pad_left(string, width, pad = pad) :
NAs introduced by coercion to integer range
3: In stri_pad_left(string, width, pad = pad) :
NAs introduced by coercion to integer range

Here is my session info in case the issue is there.

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
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

other attached packages:
[1] WVPlots_0.1 mgcv_1.8-16 nlme_3.1-128 stringr_1.1.0 plyr_1.8.4
[6] ROCR_1.0-7 gplots_3.0.1 reshape2_1.4.2 gridExtra_2.2.1 tidyr_0.6.0
[11] ggplot2_2.2.0 vtreat_0.5.28

loaded via a namespace (and not attached):
[1] Rcpp_0.12.8 magrittr_1.5 munsell_0.4.3 colorspace_1.3-2
[5] lattice_0.20-34 R6_2.2.0 dplyr_0.5.0 caTools_1.17.1
[9] tools_3.3.2 gtable_0.2.0 KernSmooth_2.23-15 DBI_0.5-1
[13] gtools_3.5.0 digest_0.6.10 lazyeval_0.2.0 assertthat_0.1
[17] tibble_1.2 Matrix_1.2-7.1 RColorBrewer_1.1-2 bitops_1.0-6
[21] labeling_0.3 gdata_2.17.0 stringi_1.1.2 scales_0.4.1

I greatly appreciate any help I can get with this issue!
Tyler

annotation text size

Hi, I am trying to create a ~large 6x11 plot using grid.arrange and have been able to edit most of the text elements in the ShadedDensityCenter figures using theme(). I have not been able to adjust the annotation text size and wonder if there is an easy solution that I am just not finding. The figure is almost perfect but the annotation text is so large that it does not fit.

Thank you,

Jenn

The code in case it is useful:

test = lapply(names(ef_df), function(colname) {
 threshold <- c(quantile(ef_df[, colname], c(0))[[1]],0)
  WVPlots::ShadedDensityCenter(frame = ef_df, 
                               xvar = colname,
                               boundaries  = threshold,
                               title = colname, 
                               shading = "darkred") +
    theme(plot.title = element_text(hjust = 0.5,size = 10),
          axis.title.x = element_blank(),
          axis.title.y = element_blank()) 
  
})

gridExtra::grid.arrange(grobs = test,ncol=5, bottom = "Region Pair Group Differences", left= "Density") 

Dot-dot notation deprecated in ggplot2 3.4.0

I'm getting the following warning message:

Warning message:
The dot-dot notation (`..density..`) was deprecated in ggplot2 3.4.0.
ℹ Please use `after_stat(density)` instead.
ℹ The deprecated feature was likely used in the WVPlots package.

Congrats for the great package. Keep up the good work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.