Skip to content
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

ggplot: themes: Font styles and Bold #110

Merged
merged 2 commits into from
Oct 1, 2014
Merged

Conversation

pedrodz
Copy link
Contributor

@pedrodz pedrodz commented Oct 1, 2014

From Asana task: https://app.asana.com/0/15417658028776/15417658028776

  • Add family fonts to title, axis title, legend and text. To use like in: p <- p + theme(plot.title=element_text(family="Raleway"))
  • Add bold, italic and bold.italic face to title, axis title and text. To use like in: p <- p + theme(plot.title=element_text(face="bold"))

Comments:
Family font for axis is already integrated.
Legend Title is not implemented in Plotly yet.
Legend and ticks elements are hidden in the JSON. Not evident to concatenate HTML elements to it.

Examples:
Title, face=“bold”: https://plot.ly/~pdespouy/1390/scatter-plot-example/
Title, family=“Times”: https://plot.ly/~pdespouy/1389/scatter-plot-example/
Title, face=“bold” and family=“Times”: https://plot.ly/~pdespouy/1391/scatter-plot-example/
xaxis, face=“bold” and family=“Raleway”; yaxis, family=“Raleway”: https://plot.ly/~pdespouy/1392/scatter-plot-example/
Legend, family=“Raleway”: https://plot.ly/~pdespouy/1393/scatter-plot-example/
Text, family=“Raleway”: https://plot.ly/~pdespouy/1394/scatter-plot-example/
Text, face=“italic”: https://plot.ly/~pdespouy/1401/scatter-plot-example/
Text, face=“bold.italic”: https://plot.ly/~pdespouy/1402/scatter-plot-example/
Text, family=“Raleway”: face=bold.italic: https://plot.ly/~pdespouy/1403/scatter-plot-example/

cc// @mkcor

layout$yaxis$title <- paste0("<b>", layout$yaxis$title, "</b>")
layout$xaxis$title <- paste0("<b>", layout$xaxis$title, "</b>")
}
if (text_face=="italic") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an else if. Same line 799.

@mkcor
Copy link
Contributor

mkcor commented Oct 1, 2014

👍

pedrodz added a commit that referenced this pull request Oct 1, 2014
@pedrodz pedrodz merged commit 6846097 into master Oct 1, 2014
@pedrodz pedrodz deleted the pedro-font-styles-and-bold branch October 6, 2014 19:26
@mkcor mkcor mentioned this pull request Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants