Skip to content

Commit 95c8eed

Browse files
committed
Clean up comments
1 parent 28d6ad3 commit 95c8eed

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

R/plot.R

+8-11
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ current.xts_chob <- function() invisible(get(".xts_chob",.plotxtsEnv))
4141
#
4242
# * update_panels(): re-calculate the x-axis and y-axis values.
4343
# * render_panels(): render all the plot panels.
44-
# * get_ylim(): recalculate the ylim for a specific panel.
45-
# * y_grid_lines: function to plot the y-axis grid lines.
46-
# * x_grid_lines: function to plot the x-axis grid lines.
47-
# * yaxis_expr(): create the expression to render the y-axis ticks and labels.
44+
# * x_grid_lines(): plot the x-axis grid lines.
45+
# * create_ylim(): create y-axis max/min, handling when max(x) == min(x).
4846

4947
# The panel object is composed of the following fields:
5048
#
@@ -57,10 +55,10 @@ current.xts_chob <- function() invisible(get(".xts_chob",.plotxtsEnv))
5755
# * actions: a list of expressions used to render the panel.
5856
# * add_action(): a function to add an action to the list.
5957
#
60-
# The panel also has expressions for rendering the y-axis min/max values,
61-
# labels, and grid lines/ticks. It also contains an x-axis grid line expression
62-
# because we need the y-axis min/max values to know where to draw the x-axis
63-
# grid lines.
58+
# The panel has the 'yaxis_expr' expression for rendering the y-axis min/max
59+
# values, labels, and grid lines/ticks. It also contains the x-axis grid
60+
# expression because we need the y-axis min/max values to know where to draw
61+
# the x-axis grid lines on the panel.
6462

6563
# Other notes
6664
#
@@ -994,11 +992,10 @@ new.replot_xts <- function(panel=1,asp=1,xlim=c(1,10),ylim=list(structure(c(1,10
994992
for (panel_n in seq_along(Env$panels)) {
995993

996994
panel <- Env$panels[[panel_n]]
997-
# set the current active panel, so get_ylim() will use it
995+
# set the current active panel for the entire plot
998996
Env$active_panel_i <- panel_n
999997

1000998
is_header <- TRUE # header is always the first action
1001-
#panel$render_header(Env$xlim, panel_ymax[panel_n])
1002999

10031000
for (action in panel$actions) {
10041001

@@ -1320,7 +1317,7 @@ new.replot_xts <- function(panel=1,asp=1,xlim=c(1,10),ylim=list(structure(c(1,10
13201317
# some actions (e.g. addLegend) do not have 'xdata'
13211318
dat.range <- create_ylim(action_data[Env$xsubset])
13221319

1323-
# re-retrieve ylim; actions may be changed it
1320+
# re-retrieve ylim; actions may have changed it
13241321
new_ylim <-
13251322
c(min(panel$ylim[1], dat.range, na.rm = TRUE),
13261323
max(panel$ylim[2], dat.range, na.rm = TRUE))

0 commit comments

Comments
 (0)