plotly / plotly/plotly.R

ggplotly not working when plotting circular ggtree

Đang mở
#2,241 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
R
Star
2.7k
Fork
641
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,

When I try to plot through ggplotly a graph generated through ggree with circular layout it results in a error.

Example code and error:

library(MicrobiotaProcess)
library(ggtree)

data(kostic2012crc)

taxa <- tax_table(kostic2012crc)
tree <- as.treedata(taxa, include.rownames=TRUE)

ggtree(tree, layout="circular", size=0.2) +
geom_tiplab(size=1) ->p

plotly::ggplotly(p)

ERROR:
Error in rng[[xy]]$get_labels() : attempt to apply non-function
In addition: Warning messages:
1: In min(z[["x"]]$dimension %()% z$x.range %||% z$x_range) :
no non-missing arguments to min; returning Inf
2: In max(z[["x"]]$dimension %()% z$x.range %||% z$x_range) :
no non-missing arguments to max; returning -Inf
3: In min(z[["y"]]$dimension %()% z$y.range %||% z$y_range) :
no non-missing arguments to min; returning Inf
4: In max(z[["y"]]$dimension %()% z$y.range %||% z$y_range) :
no non-missing arguments to max; returning -Inf
5: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextGGtree() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
6: In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextGGtree() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues

When I try with ggtree(tree, layout="dendrogram", size=0.2) +
geom_tiplab(size=1) ->p

plotly::ggplotly(p)

It works.

It seems that it does not like the circular format.

Any tips?

Thanks

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ được báo cáo với plotly::ggplotly(), ggtree(tree, layout="circular") và geom_tiplab(). So sánh nó với bố cục dendrogram đang hoạt động và kiểm tra cảnh báo geom_GeomTextGGtree. Được xem là hoàn thành khi biểu đồ tròn chuyển đổi mà không có lỗi và cảnh báo đã nêu, đồng thời vẫn giữ nguyên các nhãn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
r
Lĩnh vực
data-visualization
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.