plotly / plotly/plotly.R

Add support for captions and subtitles

未關閉
#799 12 則留言 19 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

enhancement ggplotly
主要語言
R
星號
2.7k
分支
641
PR 合併指標
30 天內沒有已合併 PR

描述

This example shows the difference between ggplot and ggplotly objects regarding the use of "labs".
Source: R for Data Science

library(ggplot2)
library(plotly)
p<-ggplot(mpg, aes(displ, hwy)) +
  geom_point(aes(color = class)) +
  geom_smooth(se = FALSE) +
  labs(
    title = "Fuel efficiency generally decreases with engine size",
    subtitle = "Two seaters (sports cars) are an exception because of their light weight",
    caption = "Data from fueleconomy.gov"
  );
p  # This is ok, a ggplot2 object
g <- ggplotly(p)
g  #  "labs()" Just showing title (centered) and  subtilte & caption are not even showing up

labs() OK
image

labs() not ok
image

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未指定實作檔案或測試。先重現所提供的 ggplot2 和 ggplotly 範例,然後追蹤 labs() 的轉換路徑;當結果圖如來源 ggplot 所示同時顯示副標題和圖說時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
r
領域
data-visualization
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。