Make sure the modified plot is actually returned in the end:
output$fancyPlot <- renderPlotly({
plot1 = ggplot(N, aes(x = Group1, y = Group2)) +
labs(title= input$TF_query1,
x= input$celltype1, y = input$celltype2)+
geom_point(color = 'tomato')
plot1 <- plot1 +
coord_fixed(ratio = 1, xlim = NULL, ylim = NULL, expand = TRUE, clip = "on")
# return it!
plot1
})
Or alternatively should work directly if you don't save it:
output$fancyPlot <- renderPlotly({
ggplot(N, aes(x = Group1, y = Group2)) +
labs(title= input$TF_query1,
x= input$celltype1, y = input$celltype2) +
geom_point(color = 'tomato') +
coord_fixed(ratio = 1, xlim = NULL, ylim = NULL, expand = TRUE, clip = "on")
})
There is also something weird in your final )} which should be }).