Description
Here are some remaining unsupported features as taken from the great ggplot2 cookbook.
The cookbook examples are in this branch: https://github.com/ropensci/plotly/tree/add-r-cookbook-tests, in this folder: https://github.com/ropensci/plotly/tree/add-r-cookbook-tests/tests/cookbook-test-suite
-
FIXED Fixes for error bars and ticks #163 line chart with error bars throwing exception
"Error in trace.list[[j]] : subscript out of bounds”example code: http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/#line-graphs
executable code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/a45f2c70b7adf484e0b0eb8810a1e59e018adbb8/means_and_error_bars.R#L162-L191
expected outputs:
http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/line.png
http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/line-dodge.png
http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/line-dodge-ci.png
http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/line-dodge-black.png
http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/line-final.png -
custom legend labels, or trace.name
see our cookbook examples "legends/legend title with custom labels" also "legends/line chart with custom legend" -
FIXED Fixes for error bars and ticks #163 manual tick marks
expected output: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/bp_y_break.25.pngactual output: https://plot.ly/~ggplot2-cookbook/83/weight-vs-group/
code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/axes.R#L70-L71
from: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/#setting-and-hiding-tick-markers
-
FIXED Fixes for error bars and ticks #163 axes tick mark labels
see http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/#setting-tick-mark-labelsexecutable code here: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/axes.R
-
FIXED Fixes for error bars and ticks #163 manual range
expected output: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/bp_ylim0-8.pngactual output: https://plot.ly/~ggplot2-cookbook/79/weight-vs-group/
code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/axes.R#L41-L46
from: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/#setting-range-and-reversing-direction-of-an-axis
-
sizing
expected output: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/sp_coord_fixed.pngactual output: https://plot.ly/~ggplot2-cookbook/87/yval-vs-xval/
executable code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/axes.R#L129-L131
from: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/#fixed-ratio-between-x-and-y-axes
-
FIXED geom_smooth() #183 geom_smooth
great, simple examples here: http://www.cookbook-r.com/Graphs/Scatterplots_(ggplot2)/executable code here: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/scatterplots.R
A user's example here: R API: ggplot2 ggplotly(): geom_smooth() not supported #179
-
TDH 23 Feb 2015 working on legend doesn't hide
expected: http://www.cookbook-r.com/Graphs/Bar_and_line_graphs_(ggplot2)/bar-color-outline-nolegend.pngactual:
https://plot.ly/~ggplot2-cookbook/6/total-bill-vs-time/expected: http://www.cookbook-r.com/Graphs/Plotting_distributions_(ggplot2)/boxplot-fill-nolegend.png
actual: https://plot.ly/~ggplot2-cookbook/56/rating-vs-cond/executable: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/bars_and_lines.R#L28-L32, https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/a45f2c70b7adf484e0b0eb8810a1e59e018adbb8/distributions.R#L103-L106
from: http://www.cookbook-r.com/Graphs/Bar_and_line_graphs_(ggplot2)/
also see our polygons-borders test-case: http://grab.by/B8pa
also see all of the examples that have a hidden legend by default, like "suppress y ticks labels and gridlines" from axes.R
-
bar graph colors aren't right in this example
see our cookbook example "basic bar fully styled" -
y-axis range
expected output: http://www.cookbook-r.com/Graphs/Bar_and_line_graphs_(ggplot2)/line-point-ylim.pngactual output: https://plot.ly/~ggplot2-cookbook/15/total-bill-vs-time/
-
marker size is too small
expected output: http://www.cookbook-r.com/Graphs/Plotting_distributions_(ggplot2)/boxplot-mean.pngactual output: https://plot.ly/~ggplot2-cookbook/57/rating-vs-cond/
from: http://www.cookbook-r.com/Graphs/Plotting_distributions_(ggplot2)/
compare also the ggplot-abline test in our github
see also our test case "test-ggplot-size-global-scaling" and "test-ggplot-size-is-a-vector" and "test-ggplot-size-not-a-vector"
see also our cookbook example "means-and-error-bars/within-subject-error-bars"
also, too big in the example: "scatterplots/scatterplots colored by condition with extended regression line"
-
facet text is positioned oddly
annotations are positioned oddly -- maybe on plotly.js end or maybe on ggplotly end. also, the iframe is too small. in any case, looks pretty bad as a "show-off" example for facet support -- https://plot.ly/ggplot2/facet/ -
suppressed y ticks, labels, gridlines
see example from axes.R: "supress y ticks labels and gridlines"also: "hidden tick marks marks labels gridline"
-
better placement of y-axis label for stacked facets
see example from cookbooks "distributions/faceted-histograms" -
multiple density plots
looks like our conversion works for a single density plot, but not for multiple density plots. see our example from cookbook "distributions/filled density plots" and "distributions/multiple density plots" -
colors of density plots
see our example from cookbook "distributions/filled density plots". looks like "distributions/histograms" does the correct thing -
regression lines
see cookbook example "scatterplots/scatterplots_colored_by_condition_with_extended_regression_line" -
add some more spacing around the graph: expand the range
our range is flush against the domain of the axis, we might want to give the graphs a lil more breathing room, or explore just using plotly's autorange: http://grab.by/B8j6especially noticeable on this one: https://plot.ly/~TestBot/505/mpg-mean-vs-cyl/
also this one: "basic line 2" from "bars-and-lines.R"
also see our cookbook example "basic bar fill colors 1"
-
geom_rect()
Looks like this would be a cool one to add: http://stackoverflow.com/questions/17521438/geom-rect-and-alpha-does-this-work-with-hard-coded-values. An enterprise lead uses it and tried to re-make this plot today. -
histograms with date axis broken
http://grab.by/B8oq -
legend position
see our examples "legends/legend in bottom left" and similar -
re-orderding axes labels
see http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/#changing-the-order-of-itemsexecutable code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/axes.R
-
reversed continuous scale
expected output: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/bp_y_reverse.pngactual output: https://plot.ly/~ggplot2-cookbook/82/weight-vs-group/
executable code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/axes.R#L64-L66
from: http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/#reversing-the-direction-of-an-axis
-
exponential notation
http://www.cookbook-r.com/Graphs/Axes_(ggplot2)/sp_scale_log10_expticks.png -
legend background
see our cookbook example "legends/box around legend" -
annotations
http://www.cookbook-r.com/Graphs/Fonts/ -
reverse legend
actual output: https://plot.ly/~ggplot2-cookbook/96/weight-vs-group/
expected output: http://www.cookbook-r.com/Graphs/Legends_(ggplot2)/bp-legendorder.pngfrom: http://www.cookbook-r.com/Graphs/Legends_(ggplot2)/
executable code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/master/legends.R#L23-L26
see also our test "test-ggplot-stack" (although in that case, i think we're doing the correct thing)
-
FIXED Carson scales free #167 scales="free" in ggplot2
See: https://plot.ly/~zevross/18/staten-island-staten-island-staten-island-staten-island-staten-island-brooklyn-b/. It looks like we almost get it, but are using shared axes on two of them.ggplot(refdaylong, aes(date, value, color=variable)) + geom_line() + facet_wrap(~year, scales="free")
-
graph outline
expected output: http://www.cookbook-r.com/Graphs/Bar_and_line_graphs_(ggplot2)/bar2-final.pngactual output: https://plot.ly/~ggplot2-cookbook/26/average-bill-for-2-people/
from: http://www.cookbook-r.com/Graphs/Bar_and_line_graphs_(ggplot2)/#finished-examples
-
second set of error bars missing
expected output: http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/within-compare-errorbars.pngactual output: https://plot.ly/~ggplot2-cookbook/44/value-vs-condition/
executable code: https://github.com/chriddyp/ggplot2-plotly-cookbook/blob/a45f2c70b7adf484e0b0eb8810a1e59e018adbb8/means_and_error_bars.R#L340
-
log axes
see "axes--log_10_y_axes_with_exponent_tick_marks" from the "axes.r" -
ln axes
see examples: "ln y axes with visual equal spacing"
we don't have "ln" axes, so should just do linear or "log" axes -
legend font
see our cookbook examples "legends/styled legend labels" -
multi-line titles
see our cookbook example: "graph with multi-line title" -
FIXED Avoid layering multiple bars when there should be one #213
maybe ggplot2-bar-category-names should be a histogram: https://plot.ly/~TestBot/550 instead of a zillion stacked bars -
heatmap color scales
http://grab.by/B8n6 -
line type 4 should maybe just be dashed
instead of dash-dot: http://grab.by/B8oG -
too many polygons?
not sure whats going on in our bar chart for the test "polygons-springgreen3-lab: http://grab.by/B8qg -
text-size
see test "test-ggplot-text": http://grab.by/B8r0 -
shrink top margin when no title is supplied
see our test "test-ggplot-theme-background" -
grid line colors (maybe all colors?) are just lil different
see the grids in theme-ticks-and-grids test case