-
Notifications
You must be signed in to change notification settings - Fork 20
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
Smoothness for lines in parallel plot #12
Comments
@sherrylau, sorry it took me so long to get to this. If you are still there, here are some ways to achieve this. If popular enough, I'll add to
|
@timelyportfolio , Hi, I have followed your advice and the lines become smoother as planed. However, it seems that the smoother parcoords photo can not be render by shiny using The R codes is below, library(shiny)
library(parcoords)
library(htmltools)
add_smoothness <- function(pc, smoothness = 0){
stopifnot(
inherits(pc,"parcoords"),
(smoothness >= 0 && smoothness <= 1)
)
pc$x$options$smoothness <- smoothness
pc$dependencies[[length(pc$dependencies) + 1]] <- htmlDependency(
name = "sylvester",
version = "0.1.3",
src = c(href="//cdnjs.cloudflare.com/ajax/libs/sylvester/0.1.3/"),
script = "sylvester.min.js"
)
pc
}
shinyApp(
ui = fluidPage(parcoordsOutput('pcoords')),
server = function(input, output){
output$pcoords <- renderParcoords({
pc <- parcoords(mtcars)
pc2 <- add_smoothness(pc, 0.2)
return(pc2)
})
}
)
so what should I do? Waiting for your reply~ |
It appears the
|
@timelyportfolio Thank you very much! It works! |
Hi,
My current plot is like this:
Is that possible to change the smoothness like the one here?
https://syntagmatic.github.io/parallel-coordinates/
The text was updated successfully, but these errors were encountered: