2017-02-10 7 views
0

私はプロットするためにRインターフェースを持つ3Dスキャッタプロットを設定しようとしています。 私plotly呼び出しがある:私は2つの問題を抱えているR z軸とisomorphisのplotly 3D scatterplot

myaxis.list<- list(
    zeroline = TRUE, 
    showline = TRUE, 
    mirror = "ticks", 
    gridcolor = toRGB("gray50"), 
    gridwidth = 2, 
    zerolinecolor = toRGB("blue"), 
    zerolinewidth = 4, 
    linecolor = toRGB("black"), 
    linewidth = 6, 
    autotick = FALSE, 
    ticks = "outside", 
    tick0 = 0, 
    dtick = 0.25 
) 

:myaxis.listは前のように定義されて

p.sagittale<-plot_ly(data=filter(temp,tipo=='Caucasici'), x = ~coordX.Sagg , y = ~ coordY.Sagg, z = ~coordZ.Sagg,text = ~punti) %>% 
add_markers(color=~cluster) %>% 
layout(title = paste('Caucasici','Dente',i,'Sagittale'), xaxis = myaxis.list, yaxis = myaxis.list, zaxis=myaxis.list) 

が 1.私は警告受け取る:

を」 'font'、 'title'、 'titlefont'、 'autosize'、 'width'、 'height'、 'ma'のような属性があります。 'hovermode'、 'xaxis'、 'yaxis'、 'scene'、 'html'、 'html'、 'html'、 'html'、 'html'、 'html'、 'html'、 'rgin'、 'paper_bgcolor'、 'plot_bgcolor'、 'separator'、 'hidesources'、 'smith'、 'showlegend'、 ' 'angleaxis'、 'direction'、 'orientation'、 ''、 ''、 ''、 ''、 ''、 ''、 ''、 ''、 '' '' '' '' '' '' '' '' '' '' '' barmode '、 ' bargap '、' mapType '"

私の最初の質問は、どのようにz軸の美学を設定するのですか?

  1. 私は同型グラフを持っています:ティックの間の同じ間隔、x、y、z軸の同じスケール。どのように私はこれを得ることができますか?

あなたはsceneであなたの軸をラップする必要がありますあなたのサポート

+1

下のグラフの完全なコードは、あなたの投稿にデータセットを含めることができますか? – MLavoie

+1

はい、ここに入力画像がありますhttps://www.dropbox.com/sh/7ct3xpfwwj555gh/AAAJc7u3aIxIBoN4dtvjKqora?dl=0 –

答えて

1

を事前に感謝します。

layout(scene = list(xaxis = myaxis.list, 
        yaxis = myaxis.list, 
        zaxis = myaxis.list), 
     ) 

rangeを介して自分の軸の(すなわち、上部及び下限)の範囲を指定します。

myaxis.list<- list( 
    autorange = FALSE, 
    range = c(-5, 5) 
    [...] 
) 

myaxis.list<- list( 
    zeroline = TRUE, 
    showline = TRUE, 
    mirror = "ticks", 
    gridcolor = toRGB("gray50"), 
    gridwidth = 2, 
    zerolinecolor = toRGB("blue"), 
    zerolinewidth = 4, 
    linecolor = toRGB("black"), 
    linewidth = 6, 
    autotick = FALSE, 
    ticks = "outside", 
    tick0 = 0, 
    dtick = 0.25, 
    autorange = FALSE, 
    range = c(-5, 5) 
) 
p.sagittale<-plot_ly(data=filter(temp,tipo=='Caucasici'), x = ~coordX.Sagg , y = ~ coordY.Sagg, z = ~coordZ.Sagg,text = ~punti) %>% 
add_markers(color=~cluster) %>% 
layout(title = paste('Caucasici','Dente',"i",'Sagittale'), scene=list(xaxis = myaxis.list, yaxis = myaxis.list, zaxis=myaxis.list)) 

enter image description here