{"id":16896281,"url":"https://github.com/thomasp85/fawkes","last_synced_at":"2025-03-22T09:31:45.135Z","repository":{"id":66336285,"uuid":"212804446","full_name":"thomasp85/fawkes","owner":"thomasp85","description":"An R Interface to the AxiDraw plotter","archived":false,"fork":false,"pushed_at":"2023-12-11T12:58:41.000Z","size":2074,"stargazers_count":26,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T10:12:32.185Z","etag":null,"topics":["axidraw-plotter","graphics","pen-plotter","rstats"],"latest_commit_sha":null,"homepage":"https://fawkes.data-imaginist.com","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasp85.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-04T11:58:43.000Z","updated_at":"2025-01-08T07:07:05.000Z","dependencies_parsed_at":"2023-12-11T14:15:07.449Z","dependency_job_id":null,"html_url":"https://github.com/thomasp85/fawkes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Ffawkes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Ffawkes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Ffawkes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Ffawkes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasp85","download_url":"https://codeload.github.com/thomasp85/fawkes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937751,"owners_count":20535124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axidraw-plotter","graphics","pen-plotter","rstats"],"created_at":"2024-10-13T17:29:49.318Z","updated_at":"2025-03-22T09:31:44.614Z","avatar_url":"https://github.com/thomasp85.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# fawkes \u003ca href='https://fawkes.data-imaginist.com'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"138.5\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![R build status](https://github.com/thomasp85/fawkes/workflows/R-CMD-check/badge.svg)](https://github.com/thomasp85/fawkes/actions)\n[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)\n\u003c!-- badges: end --\u003e\n\nThis package provides an R API to control the [AxiDraw pen plotter](https://axidraw.com). \nUnder the hood it interfaces with the [AxiDraw Python API](https://axidraw.com/doc/py_api/)\nand provides more or less the same possibilities. More interesting, though, is\nthat it also provides integration with the standard R plotting system through\na graphic device (`axi_dev()`) that translates plotting instructions from e.g. \nbase and grid graphics to plotter movement.\n\n## Installation\nfawkes is pretty niche by its very nature and it is unlikely that it will be \nsubmitted to CRAN. This should not be conflated with it not being ready for use.\nThe current version can be installed directly from github using devtools:\n\n```{r install, eval=FALSE}\n# install.packages('devtools')\ndevtools::install_github('thomasp85/fawkes')\n```\n\n## Examples\nIt is difficult to showcase the use of a piece of software meant to communicate\nwith a pen plotter virtually. `axi_svg()` provides access to the svg plotting\ncapabilities build into the python API, and `axi_manual()` wraps the interactive\nmode. More interesting from R is the `axi_dev()` that opens up a graphic device\nthat sends instructions to the plotter. The device comes with a lot of batteries\nincluded and will e.g. ensure stroking of the requested width by drawing \nmultiple offsetted lines, draw fill with hatching, ask for pen change when the\ncolour changes, and optimise the travel path to improve plotting speed. All of\nthis is impossible to show directly, but fawkes also provides `ghost_dev()` that\nuses the exact same routines as `axi_dev()` but collects the instructions and \nlets you preview them.\n\n```{r}\nlibrary(fawkes)\nlibrary(ggplot2)\n\np \u003c- ggplot(mtcars) + \n  geom_point(aes(disp, mpg)) + \n  facet_wrap(~ gear) + \n  theme_bw(base_size = 6) + \n  theme(\n    plot.background = element_blank(),\n    panel.background = element_blank()\n  )\n\ngd \u003c- ghost_dev('A6', portrait = FALSE, margins = 5, ignore_color = TRUE)\np\ninvisible(dev.off())\n\ngd$preview()\n```\n\nIt is also possible to see the movement when the pen is raised\n\n```{r}\ngd$preview(plot_air = TRUE)\n```\n\nThis makes it easy to quickly assess the efficacy of the automatic path \noptimisation:\n\n```{r}\ngd \u003c- ghost_dev('A6', portrait = FALSE, margins = 5, ignore_color = TRUE,\n                optimize_order = 'none')\np\ninvisible(dev.off())\n\ngd$preview(plot_air = TRUE)\n```\n\n## Limitations\nAs can be seen from the plots above, there is currently no text support in \nfawkes. This shortcoming is likely to change as I improve the text and font \nsupport in R in general. Further, there is no way to plot raster images, a \nlimitation that is pretty much guarantied with a pen plotter.\n\n## Code of Conduct\nPlease note that the 'fawkes' project is released with a\n[Contributor Code of Conduct](CODE_OF_CONDUCT.md).\nBy contributing to this project, you agree to abide by its terms.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasp85%2Ffawkes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasp85%2Ffawkes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasp85%2Ffawkes/lists"}