ropensci/plotly — pull request #136 by pedrodz (2014-10-27 20:11:41+00:00)
Title: ggplot: line width and style

Summary:
- Fix typo in line style mapping (`dotted` -> `dot`);
- Add multiplier (2x) for converting `line size` from ggplot2 to `line width` in Plotly;
- Fix some tests. For example, they were using `dotted` line type - there's no such thing in Plotly; and,
- Some styling.

Line width default was `2`, that means when line size *was not* defined: an `1` in ggplot2 was a `2` in Plotly. Now, when size *was* defined it had the same value in Plotly, when it should be 2x - a `1.5` in ggplot2 should be a `3` in Plotly.
ggplot2: http://www.cookbook-r.com/Graphs/Bar_and_line_graphs_%28ggplot2%29/line-red-dotted-shape.png):
Plotly before: https://plot.ly/~pdespouy/1807
Plotly after: https://plot.ly/~pdespouy/1806

In the tests, `geom_density2d()`, `geom_step()` and `geom_contour()` size/width is `1`: that's because the *default* value in ggplot2 is `0.5`. See:
https://github.com/hadley/ggplot2/blob/4bb9270ef4d5d5062353438fd99d17b6f6de98a2/R/geom-path-density2d.r#L28
https://github.com/hadley/ggplot2/blob/4bb9270ef4d5d5062353438fd99d17b6f6de98a2/R/geom-path-contour.r#L21
https://github.com/hadley/ggplot2/blob/4bb9270ef4d5d5062353438fd99d17b6f6de98a2/R/geom-path-step.r#L39