I have a question regarding geom_point.
ui <- fluidPage(
titlePanel("Test"),
sidebarLayout(sidebarPanel(
selectInput(
"selectedColX",
"Select colum for X axis",
choices = c("tooling1","tooling2"),
selected = "tooling1"
),
selectInput(
"selectedfill",
"Energie X is vulling",
choices = c("tooling1Energie","tooling2Energie"),
selected = "tooling1Energie"
) ,
selectInput(
"selectedColY",
"Select colum for Y axis",
choices = c("subject1","subject2"),
selected = "subject1"
) ,
selectInput(
"selectedcolor",
"Energie Y is omlijning",
choices = c("subject1Energie","subject2Energie"),
selected = "subject1Energie"
) ,
),
mainPanel(plotOutput("distPlot")))
)
server <- function(input, output) {
output$distPlot <- renderPlot({
x_axis <- input$selectedColX
y_axis <- input$selectedColY
fill <- input$selectedfill
color <- input$selectedcolor
gg <-
ggplot(KEK, aes_string(x = x_axis, y = y_axis, fill = fill, col = color))
gg <- gg + geom_col(size = 1.5) +
facet_wrap(~anoniem)
gg
})
}
When I'm using this code I can great some insight, but with geom_col, it's impossible to add shape. So i thought i change it to geom_point,but if i do this and add shape and keep fill and col the same then the fill is turning black (AccesEnergie). see pictures added. Why this happens, can someone help me out please?