plotly / plotly.R

An interactive graphing library for R
https://plotly-r.com
Other
2.54k stars 622 forks source link

Add support for captions and subtitles #799

Open geponce opened 7 years ago

geponce commented 7 years ago

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

cortinah commented 7 years ago

Thank you all, implementing this enhancement would be very much appreciated. Having important info about a chart (subtitles and captions) flow through to ggplotly is likely very important to most users.

dmpe commented 7 years ago

This would be a major win if implemented @cpsievert :) 💯

EricGoldsmith commented 6 years ago

+1 for implementing this

kenahoo commented 6 years ago

Just noticed this behavior too - would be great to get this working.

mtruglio commented 6 years ago

Yep, that would be great.

CRG180 commented 6 years ago

yep, struggling with this issue

Nicktz commented 6 years ago

Any progress on this?

calstaff91 commented 6 years ago

+1

vllorens commented 5 years ago

+1 for this, is there any progress? thank you!

marshallpayne415 commented 5 years ago

Would love this functionality. Anything that keeps the ggplot -> plotly conversion as consistent as possible is a plus IMO.

SteadyGiant commented 5 years ago

I'm following this more closely than my local ballot measure tbh

marshallpayne415 commented 5 years ago

Lol. Appreciate the update! Have a great week.

Marshall

Sent from my iPhone

On Nov 5, 2018, at 10:26 AM, Everet Rummel notifications@github.com wrote:

I'm following this more closely than my local ballot measure tbh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.