{"id":23061799,"url":"https://github.com/rrwen/draw","last_synced_at":"2025-04-03T07:19:54.888Z","repository":{"id":56937195,"uuid":"142183814","full_name":"rrwen/draw","owner":"rrwen","description":"Wrapper Functions for Producing Graphics","archived":false,"fork":false,"pushed_at":"2018-07-26T18:08:16.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T04:35:41.599Z","etag":null,"topics":["box","circle","curve","diagram","draw","graphics","grid","line","package","page","r","rectangle","reproducible","shape","square","text","triangle"],"latest_commit_sha":null,"homepage":"","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/rrwen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-24T16:16:48.000Z","updated_at":"2023-05-31T14:50:49.000Z","dependencies_parsed_at":"2022-08-21T07:20:36.839Z","dependency_job_id":null,"html_url":"https://github.com/rrwen/draw","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/rrwen%2Fdraw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fdraw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fdraw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fdraw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrwen","download_url":"https://codeload.github.com/rrwen/draw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952278,"owners_count":20859813,"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":["box","circle","curve","diagram","draw","graphics","grid","line","package","page","r","rectangle","reproducible","shape","square","text","triangle"],"created_at":"2024-12-16T03:18:31.451Z","updated_at":"2025-04-03T07:19:54.868Z","avatar_url":"https://github.com/rrwen.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# draw\n\nRichard Wen  \nrrwen.dev@gmail.com  \n  \nA set of user-friendly wrapper functions for creating consistent graphics and diagrams with lines, common shapes, text, and page settings. Compatible with and based on the R 'grid' package.\n\n## Install\n\n1. Install [R](https://www.r-project.org/)\n2. Install the [RStudio](https://www.rstudio.com/products/rstudio/download/#download) code editor\n3. Open an [R Console](https://support.rstudio.com/hc/en-us/articles/200404846-Working-in-the-Console) in RStudio\n3. Install [draw](https://github.com/rrwen/draw) in an R console with [install.packages](https://www.rdocumentation.org/packages/utils/versions/3.5.1/topics/install.packages)\n\n```R\ninstall.packages(\"draw\")\n```\n\n## Usage\n\n1. Load [draw](https://github.com/rrwen/draw) with [library](https://www.rdocumentation.org/packages/base/versions/3.5.1/topics/library)\n2. Set page dimensions and units with `drawSettings`\n3. Create a new page with `drawPage`\n4. Draw graphics with `drawBox`, `drawCircle`, `drawLine`, `drawText`\n5. Export graphics to a file with `drawExport`\n\n```R\nlibrary(draw)\n\n# Set drawing settings\ndrawSettings(pageWidth = 5, pageHeight = 5, units = \"inches\")\n\n# Create a new drawing page\ndrawPage()\n\n# Draw graphics on the page\ndrawBox(x = 2.5, y = 2.5, width = 1, height = 1)\ndrawCircle(x = 2.5, y = 2.5, radius = 0.5)\ndrawLine(x = c(1, 4),\n         y = c(1 ,1))\ndrawText(x = 2.5, y = 2.5, text = \"TEXT\")\n\n# Export the drawing page to a PDF\ndrawExport(\"draw.pdf\")\n\n# Export the drawing page to a JPEG\ndrawExport(\"draw.jpeg\", ppi = 300)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fdraw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrwen%2Fdraw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fdraw/lists"}