3

I am creating a 3D line plot in plotly in R and I cannot stop the plot funciton from shortening the axes labels.

library(plotly)
my_data <- read_excel("filedir\\filename")

## Create Axis titles and margins
axx <- list(
  title = "Year-Month"
 
)

axy <- list(
  title = "Easting"
  
)

axz <- list(
  title = "Elevaiton (ft)"
)


m <- list(
  l = 50,
  r = 50,
  b = 50,
  t = 50,
  pad = 4
)

x <- 70*(runif(70, 0, 1))
y <- 55*(runif(70, 0, 1))
z <- 40*(runif(70, 0, 1))

##Plot Graph
fig <- plot_ly(my_data, x = ~Year, y = ~East, z = ~Elevation, type = 'scatter3d', mode = 'lines', color = ~Year)
fig <- fig %>% layout(scene = list(xaxis=axx,yaxis=axy,zaxis=axz))
fig <- fig %>% layout(autosize = T, margin=m)
fig

I have played around with the margins and tried to add ax.dist = 20 as well as standoff = 100 in the plot_ly() function and axes lists, but I just cannot seem to figure it out. I feel like it has something to do with the margins or image size.

The numbers are Easting values. An example of one is 1102031.3. It gets shortened to 1.10203M (See image). Thanks for any help.enter image description here

Rachel Rotz
  • 101
  • 9

0 Answers0