New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for captions and subtitles #799

Open
geponce opened this Issue Nov 17, 2016 · 12 comments

Comments

Projects
None yet
@geponce

geponce commented Nov 17, 2016

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

@cpsievert cpsievert changed the title from ggplot "labs()" not working properly with ggplotly to Add support for captions and subtitles Nov 30, 2016

@cortinah

This comment has been minimized.

cortinah commented Mar 14, 2017

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

This comment has been minimized.

dmpe commented Aug 4, 2017

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

@EricGoldsmith

This comment has been minimized.

EricGoldsmith commented Nov 14, 2017

+1 for implementing this

@kenahoo

This comment has been minimized.

kenahoo commented Jan 2, 2018

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

@mtruglio

This comment has been minimized.

mtruglio commented Jan 11, 2018

Yep, that would be great.

@CRG180

This comment has been minimized.

CRG180 commented Mar 3, 2018

yep, struggling with this issue

@Nicktz

This comment has been minimized.

Nicktz commented May 6, 2018

Any progress on this?

@calstaff91

This comment has been minimized.

calstaff91 commented Jul 17, 2018

+1

@vllorens

This comment has been minimized.

vllorens commented Oct 31, 2018

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

@marshallpayne415

This comment has been minimized.

marshallpayne415 commented Nov 5, 2018

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

@everetr

This comment has been minimized.

everetr commented Nov 5, 2018

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

@marshallpayne415

This comment has been minimized.

marshallpayne415 commented Nov 5, 2018

@ropensci ropensci locked and limited conversation to collaborators Nov 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.