I am making a dashboard that plots an x and y input. However when both inputs are passed, ggplot plots my data into a singular line. I have also tried using plotly and I get no result altogether. Would someone be able to help with a working ggplot and plotly example.
here is the ggplot code portion plus image result
renderPlot({
p <- ggplot(Merged_data_frame_hcat, aes_string(x=input$x, y=input$y)) + geom_point()
print(p)
})
and the plotly code plus image
renderPlot({
p <- plot_ly(data= Merged_data_frame_hcat,x= ~input$x, y= ~input$y,type = 'scatter', mode = 'lines' )
print(p)
})