2
使用plotly庫中有R降價R I不能得到一個餅圖的側插曲的一側。取而代之的是,它看起來像插曲被覆蓋在另一個上面一個餡餅:次要情節與Plotly R中
---
title: "Test Plotly Pie"
author: ""
date: ""
output:
html_document:
self_contained: no
---
```{r plotpie1, results='asis', tidy=FALSE, message=FALSE, fig.retina=NULL, echo=FALSE, out.width = "99%", out.height="750p[![enter image description here][1]][1]x"}
require(plotly)
require(dplyr)
p1 <- plot_ly(type="pie",values=c(5,954), height = 7,
labels=c("Change","No Change"),textinfo="label", hoverinfo="all",
textposition="outside",showlegend=F,marker=list(colors=c(
"lightskyblue",
"deepblue"
))) %>%
layout(autosize = T)
p2 <- plot_ly(type="pie",values=c(15,1325), height = 7,
labels=c("Change","No Change"),textinfo="label", hoverinfo="all",
textposition="outside",showlegend=F,marker=list(colors=c(
"lightskyblue",
"deepblue"
))) %>%
layout(autosize = T)
p4 <- suppressWarnings(subplot(
p1,
p2,
margin=0.05))
p4
```
我使用的是Windows 7 64位操作系統R上3.1.3 64位。我正在使用封裝版本:2.0.16(2015年12月中旬從Github下載)。
問題是餡餅和次要情節,不與Rmarkdown – MLavoie
作爲我懷疑......餅圖類型不支持子圖嗎?或者,您是否有一種不同的方式,您應該在子區域內調用餅圖? –
「餅圖類型不支持子圖」它看起來像...可能有人會想出一個解決方案,線和點圖工作正常。餅圖不真的有X和Y軸.... – MLavoie