Skip to content

Toby cookbook lines #196

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

Merged
merged 26 commits into from
May 7, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e47ca93
expect_shape for hline
tdhock Mar 31, 2015
3ef9be5
test scatter facet lines
tdhock Mar 31, 2015
b60d935
only copy global mapping to layer if inherit.aes
tdhock Mar 31, 2015
1bea709
compute ranges for factors
tdhock Apr 1, 2015
8e68d8a
also use ranges for date and datetime variables
tdhock Apr 1, 2015
305ad6c
tests fail
tdhock Apr 1, 2015
7308760
simplify factor handling
tdhock Apr 1, 2015
6c72262
handle dodged factors with aes.name
tdhock Apr 1, 2015
84ab366
special cases
tdhock Apr 1, 2015
6318787
markLegends + boxplot = markSplit
tdhock Apr 1, 2015
4a2dc57
no need for workaround
tdhock Apr 1, 2015
a4d0059
testing showlegend=FALSE for each trace is sufficient
tdhock Apr 1, 2015
4a7f713
set showlegend=FALSE for all but the first trace with a given name
tdhock Apr 2, 2015
56ede93
merge conflict
tdhock Apr 2, 2015
3105143
use more complicated legend merging from master
tdhock Apr 2, 2015
bd8c3f6
test for no legends
tdhock Apr 8, 2015
5fa2434
hide boxplot legends
tdhock Apr 14, 2015
96f0d40
clean up comments
tdhock Apr 14, 2015
f0eb05e
version update
tdhock Apr 15, 2015
8f937e0
Use ||, not |, for logical vector of length 1
cpsievert May 2, 2015
9ab52e1
Resolve merge conflicts with master
cpsievert May 2, 2015
f90928b
merge conflicts with master
cpsievert May 5, 2015
d142570
test fixes for cookbook-lines (due to changes in gg2list())
cpsievert May 5, 2015
ab4ca1c
Fix style (notably, RStudio indentation)
mkcor May 5, 2015
498455d
Update version and docs
mkcor May 5, 2015
4cfedf9
Fix merge conflicts with master
mkcor May 5, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up comments
  • Loading branch information
tdhock committed Apr 14, 2015
commit 96f0d4073aabf455731b0db3775c41d9830a24e6
14 changes: 7 additions & 7 deletions R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ gg2list <- function(p){
}
}

## Test fill and color to see if they encode a quantitative
## variable. This may be useful for several reasons: (1) it is
## sometimes possible to plot several different colors in the same
## trace (e.g. points), and that is faster for large numbers of
## data points and colors; (2) factors on x or y axes should be
## sent to plotly as characters, not as numeric data (which is
## what ggplot_build gives us).
# Test fill and color to see if they encode a quantitative
# variable. This may be useful for several reasons: (1) it is
# sometimes possible to plot several different colors in the same
# trace (e.g. points), and that is faster for large numbers of
# data points and colors; (2) factors on x or y axes should be
# sent to plotly as characters, not as numeric data (which is
# what ggplot_build gives us).
misc <- list()
for(a in c("fill", "colour", "x", "y", "size")){
for(data.type in c("continuous", "date", "datetime", "discrete")){
Expand Down
5 changes: 0 additions & 5 deletions R/trace_generation.R
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ toBasic <- list(
g
},
bar=function(g) {
## TODO: why is this here? bar is a basic geom.
for(a in c("fill", "colour")){
g$prestats.data[[a]] <-
g$data[[a]][match(g$prestats.data$group, g$data$group)]
Expand All @@ -389,13 +388,11 @@ toBasic <- list(
g
},
abline=function(g) {
## TODO: why not treat abline as a basic path?
g$params$xstart <- min(g$prestats.data$globxmin)
g$params$xend <- max(g$prestats.data$globxmax)
g
},
hline=function(g) {
## TODO: why not treat hline as a basic path?
if (is.factor(g$data$x)) {
g$params$xstart <- as.character(sort(g$data$x)[1])
g$params$xend <- as.character(sort(g$data$x)[length(g$data$x)])
Expand All @@ -406,13 +403,11 @@ toBasic <- list(
g
},
vline=function(g) {
## TODO: why not treat vline as a basic path?
g$params$ystart <- min(g$prestats.data$globymin)
g$params$yend <- max(g$prestats.data$globymax)
g
},
point=function(g) {
## TODO: why is this code here? point is a basic geom.
if ("size" %in% names(g$data)) {
g$params$sizemin <- min(g$prestats.data$globsizemin)
g$params$sizemax <- max(g$prestats.data$globsizemax)
Expand Down