Giter Club home page Giter Club logo

gglabeller's Issues

return selected points

This is a really useful package. I was wondering if it is possible to return the row names of the selected points to throw them into another function for misc. operations?

Also, do you know if R supports the use of a lasso tool for selection?

Thanks!!

Possible compatibility issue with ggplot2 v3.3.3

Hi, I've been using gglabeller for quite some time now and find it super helpful. However recently have been unable to use it because it throws the following error only when I try to click on a point:

Warning: Error in : Aesthetics must be either length 1 or the same as the data (32): segment.colour 189: <Anonymous>

This error occurs whether I pass the labels through the gglabeller function or in the original ggplot2 object and I believe it coincided with upgrading to ggplot2 v3.3. It also occurs if I just pass a static label (single string).

Reproducible e.g. is from your docs:

p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + 
    theme_classic(base_size = 18)

gglabeller_example <- gglabeller(p, aes(label = rownames(mtcars)))

R.version:

platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          0.1                         
year           2020                        
month          06                          
day            06                          
svn rev        78648                       
language       R                           
version.string R version 4.0.1 (2020-06-06)
nickname       See Things Now 

Any suggestions or thoughts? Thank you for your help!

Use seed arg

update to use the ggrepel seed arg rather than setting seed

Using gglabeller with geom_text_repel options for size and fontface

Hi Alicia,

Thanks for making such a great and useful package! I am trying to figure out how to modify the aesthetics of the label itself while using gglabeller (if this is pretty obvious, forgive me!). If I just use the ggrepel package to do my labelling, I can do this pretty easily using geom_text_repel, but I can't seem to figure out how to incorporate that with the utility gglabeller provides. Any insight would be helpful!

Thank you,
Sarah

Closing the Shiny from R in terminal

On closing the app by clicking the cross it leaves the terminal in a constant state of R working at 100%.
Just stuck at the stage as if the app was still open, is there a fix or a way out of this?

Cheers

only works on first element of list of plots

If I create a list of plots with map(), I'm unable to select points when gglabeller is called on any element of that list but the first. The GUI still pops up, and I can still use the "Label All" button, but brushing over points doesn't label them.

library(tidyverse)
library(gglabeller)

#Create some data
testdata <- tibble(sample = rep(LETTERS[1:6], each = 15),
                   catvar = rep(paste0("var_",letters[1:15]), times = 6),
                   contvar = abs(rnorm(90)))

#Split data into manageable chunks for plotting by categorical variables
testlist <- testdata %>%
  mutate(catvar = as.factor(catvar),
         group = as.numeric(catvar) %>%
           cut(3) %>% #cut into how many pieces?
           as.integer()) %>% 
  split(.$group) #returns a list of dataframes

testplots <- map(testlist, #for every data frame in the list...
                 ~ggplot(., aes(x = catvar, y = contvar, label = sample)) +
                   geom_point()
)
gglabeller(testplots[[1]])
gglabeller(testplots[[2]])

gglabeller GIT page example yields an error message

Alicia,
labeller is a much needed R pkg!.

But when I try the GIT mtcars example,
I get an error.

library(gglabeller) # version 0.1.0 installed from GIT, as instructed
library(ggplot2) # version 2.2.1.9000
library(ggrepel) # version 0,7.0

p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + theme_classic(base_size = 18)
gglabeller_example <- gglabeller(p, aes(label = rownames(mtcars)))

Error in gglabeller(p, aes(label = rownames(mtcars))) : labels don't match number of rows of data

Running the latest Rstudio and R versions (Linux).
Thanks for your guidance
on what is missing?.
Thank you!
SFd99
San Francisco

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.