Skip to content

Commit

Permalink
Partial conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Aug 27, 2015
1 parent c0ece82 commit 1877b6d
Show file tree
Hide file tree
Showing 5 changed files with 470 additions and 490 deletions.
51 changes: 16 additions & 35 deletions NAMESPACE
Expand Up @@ -86,48 +86,15 @@ S3method(predictdf,default)
S3method(predictdf,glm)
S3method(predictdf,locfit)
S3method(predictdf,loess)
S3method(print,Scale)
S3method(print,element)
S3method(print,facet)
S3method(print,ggplot)
S3method(print,ggproto)
S3method(print,ggproto_method)
S3method(print,rel)
S3method(print,scale)
S3method(print,theme)
S3method(print,uneval)
S3method(scale_break_info,continuous)
S3method(scale_break_info,discrete)
S3method(scale_breaks,continuous)
S3method(scale_breaks,discrete)
S3method(scale_breaks_minor,continuous)
S3method(scale_breaks_minor,discrete)
S3method(scale_clone,continuous)
S3method(scale_clone,discrete)
S3method(scale_clone,position_d)
S3method(scale_dimension,continuous)
S3method(scale_dimension,discrete)
S3method(scale_dimension,position_d)
S3method(scale_is_empty,default)
S3method(scale_is_empty,position_d)
S3method(scale_labels,continuous)
S3method(scale_labels,discrete)
S3method(scale_limits,default)
S3method(scale_limits,position_d)
S3method(scale_map,continuous)
S3method(scale_map,date)
S3method(scale_map,datetime)
S3method(scale_map,discrete)
S3method(scale_map,identity)
S3method(scale_map,position_c)
S3method(scale_map,position_d)
S3method(scale_reset,default)
S3method(scale_reset,position_d)
S3method(scale_train,continuous)
S3method(scale_train,discrete)
S3method(scale_train,identity)
S3method(scale_train,position_d)
S3method(scale_transform,continuous)
S3method(scale_transform,discrete)
S3method(scale_type,Date)
S3method(scale_type,POSIXt)
S3method(scale_type,character)
Expand All @@ -144,6 +111,7 @@ export("%+replace%")
export(.pt)
export(.stroke)
export(ContinuousRange)
export(ContinuousScale)
export(Coord)
export(CoordCartesian)
export(CoordFixed)
Expand All @@ -153,6 +121,7 @@ export(CoordPolar)
export(CoordQuickmap)
export(CoordTrans)
export(DiscreteRange)
export(DiscreteScale)
export(Geom)
export(GeomAbline)
export(GeomAnnotationMap)
Expand Down Expand Up @@ -201,6 +170,7 @@ export(PositionJitter)
export(PositionJitterdodge)
export(PositionNudge)
export(PositionStack)
export(Scale)
export(Stat)
export(StatBar)
export(StatBin)
Expand Down Expand Up @@ -378,6 +348,7 @@ export(scale_alpha_continuous)
export(scale_alpha_discrete)
export(scale_alpha_identity)
export(scale_alpha_manual)
export(scale_clone.position_d)
export(scale_color_brewer)
export(scale_color_continuous)
export(scale_color_discrete)
Expand All @@ -400,7 +371,7 @@ export(scale_colour_grey)
export(scale_colour_hue)
export(scale_colour_identity)
export(scale_colour_manual)
export(scale_dimension)
export(scale_dimension.position_d)
export(scale_fill_brewer)
export(scale_fill_continuous)
export(scale_fill_discrete)
Expand All @@ -412,12 +383,20 @@ export(scale_fill_grey)
export(scale_fill_hue)
export(scale_fill_identity)
export(scale_fill_manual)
export(scale_is_empty.position_d)
export(scale_limits.position_d)
export(scale_linetype)
export(scale_linetype_continuous)
export(scale_linetype_discrete)
export(scale_linetype_identity)
export(scale_linetype_manual)
export(scale_map.date)
export(scale_map.datetime)
export(scale_map.identity)
export(scale_map.position_c)
export(scale_map.position_d)
export(scale_radius)
export(scale_reset.position_d)
export(scale_shape)
export(scale_shape_continuous)
export(scale_shape_discrete)
Expand All @@ -429,6 +408,8 @@ export(scale_size_continuous)
export(scale_size_discrete)
export(scale_size_identity)
export(scale_size_manual)
export(scale_train.identity)
export(scale_train.position_d)
export(scale_x_continuous)
export(scale_x_date)
export(scale_x_datetime)
Expand Down
4 changes: 2 additions & 2 deletions R/panel.r
Expand Up @@ -66,10 +66,10 @@ train_position <- function(panel, data, x_scale, y_scale) {
# Initialise scales if needed, and possible.
layout <- panel$layout
if (is.null(panel$x_scales) && !is.null(x_scale)) {
panel$x_scales <- plyr::rlply(max(layout$SCALE_X), scale_clone(x_scale))
panel$x_scales <- plyr::rlply(max(layout$SCALE_X), x_scale$clone())
}
if (is.null(panel$y_scales) && !is.null(y_scale)) {
panel$y_scales <- plyr::rlply(max(layout$SCALE_Y), scale_clone(y_scale))
panel$y_scales <- plyr::rlply(max(layout$SCALE_Y), y_scale$clone())
}

# loop over each layer, training x and y scales in turn
Expand Down

0 comments on commit 1877b6d

Please sign in to comment.