ggtern

Ternary plot - scaling opacity across groups

夙愿已清 提交于 2021-01-29 21:30:52
问题 I am trying to make a contour ternary plot, with two groups, where the opacity (alpha) of the contours is a function of the density of the points (e.g. more points tightly clustered = less opaque). I am stuck on one point. My two groups (here A and B ) have unequal group sizes ( A = 150 obs, B = 50 obs), this means points in one group are frequently alot more clustered, when this is the case the opacity of group B should be much higher relative to group A , since points in group B are much

Ternary plot - scaling opacity across groups

痞子三分冷 提交于 2021-01-29 19:37:29
问题 I am trying to make a contour ternary plot, with two groups, where the opacity (alpha) of the contours is a function of the density of the points (e.g. more points tightly clustered = less opaque). I am stuck on one point. My two groups (here A and B ) have unequal group sizes ( A = 150 obs, B = 50 obs), this means points in one group are frequently alot more clustered, when this is the case the opacity of group B should be much higher relative to group A , since points in group B are much

ggtern disables some themes from ggplot2

。_饼干妹妹 提交于 2021-01-27 22:18:17
问题 Trying to switch the theme to theme_bw() is not working, theme_grey() seems to be prioritized. Any ideas why? ggplot(data=mpg,aes(y=year,x=cyl)) + geom_point() + theme_bw() EDIT : As suggested in the comments, this works when run in a clean R session. But when I implement the code in a session with ggtern loaded, the problem crops up. library(ggplot2) #Warning message: #package ‘ggplot2’ was built under R version 3.2.5 ggplot(data=mpg,aes(y=year,x=cyl)) + geom_point() + theme_bw() #

ggtern breaks ggplot2 and produces plots without axis labels etc

你。 提交于 2020-07-07 09:12:39
问题 I noticed that, since ggplot2 released their new version (3.3.0), I can no longer use the package ggtern , as it completely breaks all my plots produced with ggplot2 . library(ggplot2) df <- data.frame("x" = c(1,2), "y" = c(2,1)) ggplot(df, aes(x,y)) + geom_point() This produces a normal plot: However, when i load ggtern , I get the following: library(ggtern) ggplot(df, aes(x,y)) + geom_point() No axes etc.: It also stays this way when i detach ggtern , so I have to restart R to produce

ggtern breaks ggplot2 and produces plots without axis labels etc

≡放荡痞女 提交于 2020-07-07 09:09:38
问题 I noticed that, since ggplot2 released their new version (3.3.0), I can no longer use the package ggtern , as it completely breaks all my plots produced with ggplot2 . library(ggplot2) df <- data.frame("x" = c(1,2), "y" = c(2,1)) ggplot(df, aes(x,y)) + geom_point() This produces a normal plot: However, when i load ggtern , I get the following: library(ggtern) ggplot(df, aes(x,y)) + geom_point() No axes etc.: It also stays this way when i detach ggtern , so I have to restart R to produce

ggtern breaks ggplot2 and produces plots without axis labels etc

心已入冬 提交于 2020-07-07 09:09:13
问题 I noticed that, since ggplot2 released their new version (3.3.0), I can no longer use the package ggtern , as it completely breaks all my plots produced with ggplot2 . library(ggplot2) df <- data.frame("x" = c(1,2), "y" = c(2,1)) ggplot(df, aes(x,y)) + geom_point() This produces a normal plot: However, when i load ggtern , I get the following: library(ggtern) ggplot(df, aes(x,y)) + geom_point() No axes etc.: It also stays this way when i detach ggtern , so I have to restart R to produce

ternary plot of ggtern not working in shiny

天涯浪子 提交于 2020-06-02 03:40:44
问题 I want to use the output of ggtern() in a shiny app. However it seems to fail due to some constraints. This is what it should look like: This is the actual shiny output: See here for a reproducible example: library(shiny) library(ggtern) ui <- fluidPage( mainPanel( plotOutput("ggtern") ) ) server <- function(input, output) { output$ggtern <- renderPlot({ ggtern(data.frame(x=10, y=30, z=60), aes(x, y, z)) + geom_point() }) } shinyApp(ui = ui, server = server) Do I overlook something? 回答1: