unsupported features from the r cookbook
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- R
- Star
- 2.7k
- Fork
- 641
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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 #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 #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 #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 #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 #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: https://github.com/ropensci/plotly/issues/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 #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 #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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với các mục chưa được đánh dấu trong tests/cookbook-test-suite và các script cookbook được tham chiếu, chẳng hạn như axes.R, legends.R và bars_and_lines.R. Tái hiện một sai khác cụ thể so với đầu ra mong đợi được liên kết, sau đó thêm một bài kiểm thử hồi quy; done nên được xác định theo từng hành vi thay vì cho checklist tổng quát này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- r
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 15/100