Skip to content

Commit

Permalink
Add notes on plot.xts() nomenclature and structure
Browse files Browse the repository at this point in the history
Also add ASCII art to illustrate definitions and layout.

See #103.
  • Loading branch information
joshuaulrich committed Nov 13, 2022
1 parent ab42de9 commit 10aef28
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,74 @@

current.xts_chob <- function() invisible(get(".xts_chob",.plotxtsEnv))


# * A plot window contains multiple panels
# * There are 2 frames per panel
# * The first frame is a small 'header' frame for titles
# * The second frame is larger and where the data series is rendered, including
# axis labels
#
# The first panel is where the main series is rendered. Panels added later are
# plotted below the first panel and are smaller.
#
#
# add_frame(n) adds a new frame after frame 'n'
#
# What does 'clip' do?
#
# ____________________________________________________________________________
# / \
# | plot window |
# | |
# | ______________________________________________________________________ |
# | / \ |
# | | panel #1 | |
# | | __________________________________________________________________ | |
# | | / \ | |
# | | | header frame | | |
# | | \__________________________________________________________________/ | |
# | | __________________________________________________________________ | |
# | | / \ | |
# | | | series frame | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | \__________________________________________________________________/ | |
# | \______________________________________________________________________/ |
# | |
# | ______________________________________________________________________ |
# | / \ |
# | | panel #2 | |
# | | __________________________________________________________________ | |
# | | / \ | |
# | | | header frame | | |
# | | \__________________________________________________________________/ | |
# | | __________________________________________________________________ | |
# | | / \ | |
# | | | series frame | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | \__________________________________________________________________/ | |
# | \______________________________________________________________________/ |
# | |
# \____________________________________________________________________________/
#


# Currently not necessary, but potentially very useful:
# http://www.fromthebottomoftheheap.net/2011/07/23/passing-non-graphical-parameters-to-graphical-functions-using/
chart.lines <- function(x,
Expand Down

0 comments on commit 10aef28

Please sign in to comment.