Hi,
I am trying to create a 3D with plotly in R. Variable Y includes both positive and negative values. However, when I run the following code negative values does not appear on the y-axis as attached. How can I modify the graph to show also negative values?
kernel1 <- kde2d( data$depression_score, data$z_avg_income)
fig1 <- plot_ly(x=kernel1$depression_score, y=kernel1$z_avg_income, z=kernel1$z) %>% add_surface() %>% layout(title = 'Density graph for Depression & Z score avg. Income', xaxis = list(title = 'Depression score'), yaxis = list(title = 'Z score avg. income'))
print(fig1)
Thanks in advance!
Best regards,
Nursena