plotcli-py 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. CLAUDE.md +51 -0
  2. LICENSE +21 -0
  3. PKG-INFO +358 -0
  4. README.md +340 -0
  5. main.py +6 -0
  6. plotcli-original/.Rbuildignore +18 -0
  7. plotcli-original/.github/workflows/deploy_docs.yml +43 -0
  8. plotcli-original/.gitignore +46 -0
  9. plotcli-original/DESCRIPTION +25 -0
  10. plotcli-original/NAMESPACE +60 -0
  11. plotcli-original/NEWS.md +112 -0
  12. plotcli-original/R/ascii_escape.r +13 -0
  13. plotcli-original/R/canvas.r +586 -0
  14. plotcli-original/R/class_functions.r +114 -0
  15. plotcli-original/R/geom_registry.r +1376 -0
  16. plotcli-original/R/ggplotcli.r +234 -0
  17. plotcli-original/R/ggplotcli_helpers.r +1099 -0
  18. plotcli-original/R/helper_functions.r +351 -0
  19. plotcli-original/R/plotcli.r +963 -0
  20. plotcli-original/R/plotcli_grid.r +1 -0
  21. plotcli-original/R/plotcli_wrappers.r +416 -0
  22. plotcli-original/R/zzz.r +15 -0
  23. plotcli-original/README.md +192 -0
  24. plotcli-original/docs/ascii.png +0 -0
  25. plotcli-original/docs/bar.png +0 -0
  26. plotcli-original/docs/block.png +0 -0
  27. plotcli-original/docs/boxplot.png +0 -0
  28. plotcli-original/docs/density.png +0 -0
  29. plotcli-original/docs/facet.png +0 -0
  30. plotcli-original/docs/facet_grid.png +0 -0
  31. plotcli-original/docs/generate_png.sh +137 -0
  32. plotcli-original/docs/heatmap.png +0 -0
  33. plotcli-original/docs/histogram.png +0 -0
  34. plotcli-original/docs/line.png +0 -0
  35. plotcli-original/docs/noborder.png +0 -0
  36. plotcli-original/docs/scatter.png +0 -0
  37. plotcli-original/docs/showcase.R +182 -0
  38. plotcli-original/inst/doc/ggplotcli.R +231 -0
  39. plotcli-original/inst/doc/ggplotcli.Rmd +329 -0
  40. plotcli-original/inst/doc/ggplotcli.html +1078 -0
  41. plotcli-original/inst/doc/plotcli_class.R +98 -0
  42. plotcli-original/inst/doc/plotcli_class.Rmd +121 -0
  43. plotcli-original/inst/doc/plotcli_class.html +564 -0
  44. plotcli-original/inst/doc/plotcli_wrappers.R +35 -0
  45. plotcli-original/inst/doc/plotcli_wrappers.Rmd +62 -0
  46. plotcli-original/inst/doc/plotcli_wrappers.html +546 -0
  47. plotcli-original/man/AsciiCanvas.Rd +116 -0
  48. plotcli-original/man/BlockCanvas.Rd +132 -0
  49. plotcli-original/man/BrailleCanvas.Rd +146 -0
  50. plotcli-original/man/Canvas.Rd +492 -0
  51. plotcli-original/man/GeomRegistry.Rd +9 -0
  52. plotcli-original/man/add_legend_to_output.Rd +12 -0
  53. plotcli-original/man/braille_dot_bit.Rd +29 -0
  54. plotcli-original/man/braille_set_dot.Rd +21 -0
  55. plotcli-original/man/bresenham.Rd +27 -0
  56. plotcli-original/man/build_plot_output.Rd +28 -0
  57. plotcli-original/man/build_plot_output_v2.Rd +41 -0
  58. plotcli-original/man/cat_plot_matrix.Rd +17 -0
  59. plotcli-original/man/cbind.plotcli.Rd +19 -0
  60. plotcli-original/man/cbind_plots.Rd +17 -0
  61. plotcli-original/man/color_to_term.Rd +18 -0
  62. plotcli-original/man/create_canvas.Rd +21 -0
  63. plotcli-original/man/create_panel_scales.Rd +29 -0
  64. plotcli-original/man/create_scales.Rd +27 -0
  65. plotcli-original/man/dot-geom_registry.Rd +16 -0
  66. plotcli-original/man/draw_border.Rd +12 -0
  67. plotcli-original/man/draw_grid.Rd +12 -0
  68. plotcli-original/man/extract_legend_info.Rd +12 -0
  69. plotcli-original/man/extract_plot_labels.Rd +12 -0
  70. plotcli-original/man/extract_plot_style.Rd +12 -0
  71. plotcli-original/man/format_axis_label.Rd +18 -0
  72. plotcli-original/man/format_four_chars.Rd +21 -0
  73. plotcli-original/man/geom_area_handler.Rd +12 -0
  74. plotcli-original/man/geom_bar_handler.Rd +12 -0
  75. plotcli-original/man/geom_boxplot_handler.Rd +13 -0
  76. plotcli-original/man/geom_density_handler.Rd +12 -0
  77. plotcli-original/man/geom_histogram_handler.Rd +12 -0
  78. plotcli-original/man/geom_hline_handler.Rd +12 -0
  79. plotcli-original/man/geom_line_handler.Rd +12 -0
  80. plotcli-original/man/geom_path_handler.Rd +12 -0
  81. plotcli-original/man/geom_point_handler.Rd +12 -0
  82. plotcli-original/man/geom_rect_handler.Rd +12 -0
  83. plotcli-original/man/geom_segment_handler.Rd +12 -0
  84. plotcli-original/man/geom_smooth_handler.Rd +12 -0
  85. plotcli-original/man/geom_text_handler.Rd +12 -0
  86. plotcli-original/man/geom_vline_handler.Rd +12 -0
  87. plotcli-original/man/get_color_hue.Rd +18 -0
  88. plotcli-original/man/get_data_subset.Rd +23 -0
  89. plotcli-original/man/get_facet_info.Rd +18 -0
  90. plotcli-original/man/get_geom_handler.Rd +17 -0
  91. plotcli-original/man/get_term_colors.Rd +21 -0
  92. plotcli-original/man/ggplotcli.Rd +83 -0
  93. plotcli-original/man/init_color_mapping.Rd +15 -0
  94. plotcli-original/man/is_braille.Rd +20 -0
  95. plotcli-original/man/is_geom_registered.Rd +17 -0
  96. plotcli-original/man/list_registered_geoms.Rd +14 -0
  97. plotcli-original/man/make_colored.Rd +23 -0
  98. plotcli-original/man/make_unique_names.Rd +20 -0
  99. plotcli-original/man/normalize_data.Rd +27 -0
  100. plotcli-original/man/pclib.Rd +48 -0
  101. plotcli-original/man/pclibx.Rd +46 -0
  102. plotcli-original/man/pclid.Rd +44 -0
  103. plotcli-original/man/pclih.Rd +50 -0
  104. plotcli-original/man/pclil.Rd +48 -0
  105. plotcli-original/man/pclis.Rd +48 -0
  106. plotcli-original/man/pixel_to_braille.Rd +23 -0
  107. plotcli-original/man/plotcli.Rd +598 -0
  108. plotcli-original/man/plotcli_bar.Rd +48 -0
  109. plotcli-original/man/plotcli_box.Rd +46 -0
  110. plotcli-original/man/plotcli_density.Rd +44 -0
  111. plotcli-original/man/plotcli_histogram.Rd +50 -0
  112. plotcli-original/man/plotcli_line.Rd +48 -0
  113. plotcli-original/man/plotcli_options.Rd +18 -0
  114. plotcli-original/man/plotcli_scatter.Rd +48 -0
  115. plotcli-original/man/plus-.plotcli.Rd +19 -0
  116. plotcli-original/man/rbind.plotcli.Rd +19 -0
  117. plotcli-original/man/rbind_plots.Rd +17 -0
  118. plotcli-original/man/register_geom.Rd +21 -0
  119. plotcli-original/man/remove_color_codes.Rd +21 -0
  120. plotcli-original/man/render_faceted_plot.Rd +25 -0
  121. plotcli-original/man/render_single_panel.Rd +12 -0
  122. plotcli-original/man/safe_aes_name.Rd +18 -0
  123. plotcli-original/tests/testthat/test-new-geoms.R +136 -0
  124. plotcli-original/tests/testthat/test-plotcli.R +69 -0
  125. plotcli-original/tests/testthat.R +4 -0
  126. plotcli-original/vignettes/ggplotcli.Rmd +329 -0
  127. plotcli-original/vignettes/plotcli_class.R +98 -0
  128. plotcli-original/vignettes/plotcli_class.Rmd +121 -0
  129. plotcli-original/vignettes/plotcli_wrappers.R +35 -0
  130. plotcli-original/vignettes/plotcli_wrappers.Rmd +62 -0
  131. plotcli.egg-info/PKG-INFO +11 -0
  132. plotcli.egg-info/SOURCES.txt +7 -0
  133. plotcli.egg-info/dependency_links.txt +1 -0
  134. plotcli.egg-info/entry_points.txt +3 -0
  135. plotcli.egg-info/top_level.txt +1 -0
  136. plotcli.py +978 -0
  137. plotcli_py-0.1.0.dist-info/METADATA +358 -0
  138. plotcli_py-0.1.0.dist-info/RECORD +143 -0
  139. plotcli_py-0.1.0.dist-info/WHEEL +4 -0
  140. plotcli_py-0.1.0.dist-info/entry_points.txt +2 -0
  141. plotcli_py-0.1.0.dist-info/licenses/LICENSE +21 -0
  142. pyproject.toml +31 -0
  143. uv.lock +8 -0
@@ -0,0 +1,17 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/class_functions.r
3
+ \name{cbind_plots}
4
+ \alias{cbind_plots}
5
+ \title{Combine plot matrices horizontally}
6
+ \usage{
7
+ cbind_plots(...)
8
+ }
9
+ \arguments{
10
+ \item{...}{A list of plot matrices to be combined.}
11
+ }
12
+ \value{
13
+ A combined plot matrix.
14
+ }
15
+ \description{
16
+ This function combines multiple plot matrices horizontally, centering them vertically.
17
+ }
@@ -0,0 +1,18 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{color_to_term}
4
+ \alias{color_to_term}
5
+ \title{Convert ggplot2 color to terminal color name}
6
+ \usage{
7
+ color_to_term(color)
8
+ }
9
+ \arguments{
10
+ \item{color}{A color value (hex, name, or R color)}
11
+ }
12
+ \value{
13
+ A terminal color name (blue, red, green, etc.) or NULL
14
+ }
15
+ \description{
16
+ If init_color_mapping() was called, uses the pre-computed mapping.
17
+ Otherwise falls back to simple hue-based matching.
18
+ }
@@ -0,0 +1,21 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/canvas.r
3
+ \name{create_canvas}
4
+ \alias{create_canvas}
5
+ \title{Create a canvas of the specified type}
6
+ \usage{
7
+ create_canvas(width, height, type = "braille")
8
+ }
9
+ \arguments{
10
+ \item{width}{Character width}
11
+
12
+ \item{height}{Character height}
13
+
14
+ \item{type}{Canvas type: "ascii", "braille", or "block"}
15
+ }
16
+ \value{
17
+ A Canvas object
18
+ }
19
+ \description{
20
+ Create a canvas of the specified type
21
+ }
@@ -0,0 +1,29 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{create_panel_scales}
4
+ \alias{create_panel_scales}
5
+ \title{Create Scales for a Single Panel}
6
+ \usage{
7
+ create_panel_scales(panel_params, plot_width, plot_height,
8
+ has_border = FALSE, x_mult = 1, y_mult = 1)
9
+ }
10
+ \arguments{
11
+ \item{panel_params}{Panel parameters from ggplot_build}
12
+
13
+ \item{plot_width}{Pixel width}
14
+
15
+ \item{plot_height}{Pixel height}
16
+
17
+ \item{has_border}{Whether a border will be drawn (adds padding)}
18
+
19
+ \item{x_mult}{X multiplier for canvas type (e.g., 2 for braille)}
20
+
21
+ \item{y_mult}{Y multiplier for canvas type (e.g., 4 for braille)}
22
+ }
23
+ \value{
24
+ List with scale functions
25
+ }
26
+ \description{
27
+ Create Scales for a Single Panel
28
+ }
29
+ \keyword{internal}
@@ -0,0 +1,27 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{create_scales}
4
+ \alias{create_scales}
5
+ \title{Create Scale Object from ggplot_build data}
6
+ \usage{
7
+ create_scales(built, plot_width, plot_height, has_border = FALSE, x_mult = 1, y_mult = 1)
8
+ }
9
+ \arguments{
10
+ \item{built}{Result from ggplot_build()}
11
+
12
+ \item{plot_width}{Canvas pixel width}
13
+
14
+ \item{plot_height}{Canvas pixel height}
15
+
16
+ \item{has_border}{Whether a border will be drawn (adds padding)}
17
+
18
+ \item{x_mult}{X multiplier for canvas type (e.g., 2 for braille)}
19
+
20
+ \item{y_mult}{Y multiplier for canvas type (e.g., 4 for braille)}
21
+ }
22
+ \value{
23
+ List with x_scale and y_scale functions
24
+ }
25
+ \description{
26
+ Create Scale Object from ggplot_build data
27
+ }
@@ -0,0 +1,16 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \docType{data}
4
+ \name{.geom_registry}
5
+ \alias{.geom_registry}
6
+ \title{Geom Registry Environment}
7
+ \format{
8
+ An object of class \code{environment} of length 15.
9
+ }
10
+ \usage{
11
+ .geom_registry
12
+ }
13
+ \description{
14
+ Internal environment storing registered geom handlers
15
+ }
16
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{draw_border}
4
+ \alias{draw_border}
5
+ \title{Draw Border Around Canvas}
6
+ \usage{
7
+ draw_border(canvas)
8
+ }
9
+ \description{
10
+ Draw Border Around Canvas
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{draw_grid}
4
+ \alias{draw_grid}
5
+ \title{Draw Grid Lines on Canvas}
6
+ \usage{
7
+ draw_grid(canvas, scales, grid_type)
8
+ }
9
+ \description{
10
+ Draw Grid Lines on Canvas
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{extract_legend_info}
4
+ \alias{extract_legend_info}
5
+ \title{Extract Legend Information from ggplot}
6
+ \usage{
7
+ extract_legend_info(built)
8
+ }
9
+ \description{
10
+ Extract Legend Information from ggplot
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{extract_plot_labels}
4
+ \alias{extract_plot_labels}
5
+ \title{Extract Plot Labels from ggplot}
6
+ \usage{
7
+ extract_plot_labels(built, title, subtitle, caption, axis_labels)
8
+ }
9
+ \description{
10
+ Extract Plot Labels from ggplot
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{extract_plot_style}
4
+ \alias{extract_plot_style}
5
+ \title{Extract Plot Style from ggplot Theme}
6
+ \usage{
7
+ extract_plot_style(built, border, grid, legend)
8
+ }
9
+ \description{
10
+ Extract Plot Style from ggplot Theme
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,18 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{format_axis_label}
4
+ \alias{format_axis_label}
5
+ \title{Format Axis Label}
6
+ \usage{
7
+ format_axis_label(value)
8
+ }
9
+ \arguments{
10
+ \item{value}{Numeric value}
11
+ }
12
+ \value{
13
+ Formatted string
14
+ }
15
+ \description{
16
+ Format Axis Label
17
+ }
18
+ \keyword{internal}
@@ -0,0 +1,21 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/helper_functions.r
3
+ \name{format_four_chars}
4
+ \alias{format_four_chars}
5
+ \title{Format number to four characters}
6
+ \usage{
7
+ format_four_chars(num)
8
+ }
9
+ \arguments{
10
+ \item{num}{The number to be formatted.}
11
+ }
12
+ \value{
13
+ A string representation of the number with exactly four characters.
14
+ }
15
+ \description{
16
+ This function formats a number to a string of exactly four characters.
17
+ }
18
+ \examples{
19
+ format_four_chars(123)
20
+ format_four_chars(-12.34)
21
+ }
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_area_handler}
4
+ \alias{geom_area_handler}
5
+ \title{GeomArea Handler}
6
+ \usage{
7
+ geom_area_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders filled areas
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_bar_handler}
4
+ \alias{geom_bar_handler}
5
+ \title{GeomBar/GeomCol Handler}
6
+ \usage{
7
+ geom_bar_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders bar charts
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,13 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_boxplot_handler}
4
+ \alias{geom_boxplot_handler}
5
+ \title{GeomBoxplot Handler}
6
+ \usage{
7
+ geom_boxplot_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders boxplots with whiskers, box, median line, and outliers.
11
+ Supports two styles: "ascii" (box-drawing characters) and "braille" (Braille dots).
12
+ }
13
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_density_handler}
4
+ \alias{geom_density_handler}
5
+ \title{GeomDensity Handler}
6
+ \usage{
7
+ geom_density_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders density curves
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_histogram_handler}
4
+ \alias{geom_histogram_handler}
5
+ \title{GeomHistogram Handler}
6
+ \usage{
7
+ geom_histogram_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders histograms (same as bar)
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_hline_handler}
4
+ \alias{geom_hline_handler}
5
+ \title{GeomHline Handler}
6
+ \usage{
7
+ geom_hline_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders horizontal lines
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_line_handler}
4
+ \alias{geom_line_handler}
5
+ \title{GeomLine Handler}
6
+ \usage{
7
+ geom_line_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders connected lines
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_path_handler}
4
+ \alias{geom_path_handler}
5
+ \title{GeomPath Handler}
6
+ \usage{
7
+ geom_path_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders connected paths (order by data, not x)
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_point_handler}
4
+ \alias{geom_point_handler}
5
+ \title{GeomPoint Handler}
6
+ \usage{
7
+ geom_point_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders points as individual pixels or small shapes
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_rect_handler}
4
+ \alias{geom_rect_handler}
5
+ \title{GeomRect Handler}
6
+ \usage{
7
+ geom_rect_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders rectangles
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_segment_handler}
4
+ \alias{geom_segment_handler}
5
+ \title{GeomSegment Handler}
6
+ \usage{
7
+ geom_segment_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders line segments
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_smooth_handler}
4
+ \alias{geom_smooth_handler}
5
+ \title{GeomSmooth Handler}
6
+ \usage{
7
+ geom_smooth_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders smoothed lines (just draws the line, ignores confidence interval)
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_text_handler}
4
+ \alias{geom_text_handler}
5
+ \title{GeomText Handler}
6
+ \usage{
7
+ geom_text_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders text labels
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,12 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{geom_vline_handler}
4
+ \alias{geom_vline_handler}
5
+ \title{GeomVline Handler}
6
+ \usage{
7
+ geom_vline_handler(data, canvas, scales, params, style_opts = NULL)
8
+ }
9
+ \description{
10
+ Renders vertical lines
11
+ }
12
+ \keyword{internal}
@@ -0,0 +1,18 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{get_color_hue}
4
+ \alias{get_color_hue}
5
+ \title{Get the hue of a color (0-360 degrees)}
6
+ \usage{
7
+ get_color_hue(color)
8
+ }
9
+ \arguments{
10
+ \item{color}{A color value}
11
+ }
12
+ \value{
13
+ Hue in degrees (0-360) or NA for grayscale
14
+ }
15
+ \description{
16
+ Get the hue of a color (0-360 degrees)
17
+ }
18
+ \keyword{internal}
@@ -0,0 +1,23 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli.r
3
+ \name{get_data_subset}
4
+ \alias{get_data_subset}
5
+ \title{Get data subset for a specific geom}
6
+ \usage{
7
+ get_data_subset(geom_name, data, aes, p_build)
8
+ }
9
+ \arguments{
10
+ \item{geom_name}{The name of the geom for which the data subset is needed.}
11
+
12
+ \item{data}{The data to be subsetted.}
13
+
14
+ \item{aes}{The aesthetic mappings for the geom.}
15
+
16
+ \item{p_build}{The ggplot build object.}
17
+ }
18
+ \value{
19
+ A list containing the data subset for the specified geom.
20
+ }
21
+ \description{
22
+ This function returns a subset of the data for a specific geom.
23
+ }
@@ -0,0 +1,18 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli_helpers.r
3
+ \name{get_facet_info}
4
+ \alias{get_facet_info}
5
+ \title{Get Facet Information from Layout}
6
+ \usage{
7
+ get_facet_info(layout)
8
+ }
9
+ \arguments{
10
+ \item{layout}{The layout object from ggplot_build}
11
+ }
12
+ \value{
13
+ List with facet info
14
+ }
15
+ \description{
16
+ Get Facet Information from Layout
17
+ }
18
+ \keyword{internal}
@@ -0,0 +1,17 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{get_geom_handler}
4
+ \alias{get_geom_handler}
5
+ \title{Get a Geom Handler}
6
+ \usage{
7
+ get_geom_handler(geom_name)
8
+ }
9
+ \arguments{
10
+ \item{geom_name}{Name of the geom}
11
+ }
12
+ \value{
13
+ The handler function or NULL
14
+ }
15
+ \description{
16
+ Retrieve the registered handler for a geom, or NULL if not found.
17
+ }
@@ -0,0 +1,21 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/helper_functions.r
3
+ \name{get_term_colors}
4
+ \alias{get_term_colors}
5
+ \title{Get terminal colors}
6
+ \usage{
7
+ get_term_colors(n = NULL)
8
+ }
9
+ \arguments{
10
+ \item{n}{The number of colors to return.}
11
+ }
12
+ \value{
13
+ A vector of terminal colors.
14
+ }
15
+ \description{
16
+ This function returns a vector of terminal colors.
17
+ }
18
+ \examples{
19
+ get_term_colors(5)
20
+ get_term_colors(10)
21
+ }
@@ -0,0 +1,83 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/ggplotcli.r
3
+ \name{ggplotcli}
4
+ \alias{ggplotcli}
5
+ \title{ggplotcli - Render ggplot2 objects in the terminal}
6
+ \usage{
7
+ ggplotcli(
8
+ p,
9
+ width = 60,
10
+ height = 20,
11
+ canvas_type = "braille",
12
+ border = "auto",
13
+ grid = "none",
14
+ show_axes = TRUE,
15
+ axis_labels = TRUE,
16
+ legend = "auto",
17
+ title_align = "center",
18
+ subtitle = TRUE,
19
+ caption = TRUE,
20
+ title = NULL,
21
+ boxplot_style = "ascii"
22
+ )
23
+ }
24
+ \arguments{
25
+ \item{p}{A ggplot2 object to render}
26
+
27
+ \item{width}{Character width of the plot (default: 60)}
28
+
29
+ \item{height}{Character height of the plot (default: 20)}
30
+
31
+ \item{canvas_type}{Type of canvas: "braille" (high-res), "block" (medium), or "ascii" (basic). Default: "braille"}
32
+
33
+ \item{border}{Draw border around plot. "auto" uses ggplot theme, or TRUE/FALSE (default: "auto")}
34
+
35
+ \item{grid}{Grid lines: "none", "major", "minor", "both", or "auto" (default: "none")}
36
+
37
+ \item{show_axes}{Whether to show axis values (default: TRUE)}
38
+
39
+ \item{axis_labels}{Whether to show axis labels from ggplot (default: TRUE)}
40
+
41
+ \item{legend}{Legend display: "auto", "right", "bottom", "none" (default: "auto")}
42
+
43
+ \item{title_align}{Title alignment: "center" or "left" (default: "center")}
44
+
45
+ \item{subtitle}{Whether to show subtitle (default: TRUE)}
46
+
47
+ \item{caption}{Whether to show caption (default: TRUE)}
48
+
49
+ \item{title}{Optional title override (NULL uses ggplot title)}
50
+
51
+ \item{boxplot_style}{Style for boxplots: "ascii" uses box-drawing characters (default),
52
+ "braille" uses Braille dots like other geoms}
53
+ }
54
+ \value{
55
+ Invisibly returns the canvas object
56
+ }
57
+ \description{
58
+ Convert any ggplot2 plot to a terminal-based visualization using Unicode
59
+ Braille characters or ASCII. Supports 15+ geom types, faceting, themes,
60
+ and color aesthetics.
61
+ }
62
+ \examples{
63
+ library(ggplot2)
64
+
65
+ # Basic scatter plot
66
+ p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()
67
+ ggplotcli(p)
68
+
69
+ # With styling
70
+ ggplotcli(p, border = TRUE, grid = "major")
71
+
72
+ # Faceted plot
73
+ p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
74
+ geom_point() +
75
+ facet_wrap(~cyl)
76
+ ggplotcli(p, width = 70, height = 16)
77
+
78
+ # Multiple geoms
79
+ p <- ggplot(mtcars, aes(x = mpg)) +
80
+ geom_histogram(aes(y = after_stat(density)), bins = 10) +
81
+ geom_density(color = "red")
82
+ ggplotcli(p)
83
+ }
@@ -0,0 +1,15 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/geom_registry.r
3
+ \name{init_color_mapping}
4
+ \alias{init_color_mapping}
5
+ \title{Initialize color mapping for a set of ggplot colors}
6
+ \usage{
7
+ init_color_mapping(ggplot_colors)
8
+ }
9
+ \arguments{
10
+ \item{ggplot_colors}{Vector of unique colors from ggplot}
11
+ }
12
+ \description{
13
+ This function takes all unique colors from a ggplot and assigns terminal
14
+ colors to minimize repetition while respecting hue similarity.
15
+ }
@@ -0,0 +1,20 @@
1
+ % Generated by roxygen2: do not edit by hand
2
+ % Please edit documentation in R/helper_functions.r
3
+ \name{is_braille}
4
+ \alias{is_braille}
5
+ \title{Check if a character is a Braille character}
6
+ \usage{
7
+ is_braille(char)
8
+ }
9
+ \arguments{
10
+ \item{char}{The character to be checked.}
11
+ }
12
+ \value{
13
+ A boolean value indicating whether the character is a Braille character or not.
14
+ }
15
+ \description{
16
+ This function checks if a given character is a Braille character.
17
+ }
18
+ \examples{
19
+ is_braille("A")
20
+ }