Lines on Bars in Graph When Publishing Shiny

When I publish my Shiny App, lines appear on my bar graphs that aren't there when I just run my Shiny App. I do not specify the size of my plots in my code (I just call the name of the graph).

This is what my graph looks like when I run my Shiny:


This is what my graph looked like when I publish my Shiny App:

Any ideas on how to resolve this issue? Thank you.

Hi @EmilyA. Try to map the color as the fill in ggplot. If problem still there, can you share your code?

1 Like

Thank you for your response. My color is set by the fill in ggplot.

Here's my code:

output$permit <- renderPlot({
final_data %>%
filter(year == input$chosenyear) %>%
ggplot(aes(x = month, y = permit, fill = month)) +
geom_bar(stat = 'identity', show.legend = FALSE) +
labs(x = "Month",
y = "Number of Permits Granted") +
scale_y_continuous(labels = comma)
})

@EmilyA. You may try to set the color also as follow.

output$permit <- renderPlot({
final_data %>%
filter(year == input$chosenyear) %>%
ggplot(aes(x = month, y = permit, fill = month, color = month)) +
geom_bar(stat = 'identity', show.legend = FALSE) +
labs(x = "Month",
y = "Number of Permits Granted") +
scale_y_continuous(labels = comma)
})```
1 Like

It worked!!! Thank you so much!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.