{"id":15893080,"url":"https://github.com/jumpingrivers/prettyb","last_synced_at":"2025-08-30T09:35:30.054Z","repository":{"id":54558332,"uuid":"70734426","full_name":"jumpingrivers/prettyB","owner":"jumpingrivers","description":"Prettified base graphics","archived":false,"fork":false,"pushed_at":"2022-05-03T19:23:29.000Z","size":1666,"stargazers_count":64,"open_issues_count":1,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-08-25T11:19:44.938Z","etag":null,"topics":["graphics","r","r-package","rstats","visualization"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jumpingrivers.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-12T19:31:46.000Z","updated_at":"2025-03-22T08:13:32.000Z","dependencies_parsed_at":"2022-08-13T19:40:18.396Z","dependency_job_id":null,"html_url":"https://github.com/jumpingrivers/prettyB","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jumpingrivers/prettyB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jumpingrivers%2FprettyB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jumpingrivers%2FprettyB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jumpingrivers%2FprettyB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jumpingrivers%2FprettyB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jumpingrivers","download_url":"https://codeload.github.com/jumpingrivers/prettyB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jumpingrivers%2FprettyB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272833295,"owners_count":25000870,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["graphics","r","r-package","rstats","visualization"],"created_at":"2024-10-06T08:07:18.808Z","updated_at":"2025-08-30T09:35:30.007Z","avatar_url":"https://github.com/jumpingrivers.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  cache = FALSE,\n  fig.align = 'center'\n)\nset.seed(1)\n```\n\n## Prettified Base Graphics\n\n[![R-CMD-check](https://github.com/jumpingrivers/prettyB/workflows/R-CMD-check/badge.svg)](https://github.com/jumpingrivers/prettyB/actions)\n[![CRAN](http://www.r-pkg.org/badges/version/prettyB)](https://cran.r-project.org/package=prettyB)\n[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![Coverage status](https://codecov.io/gh/jumpingrivers/prettyB/branch/master/graph/badge.svg)](https://codecov.io/github/jumpingrivers/prettyB?branch=master)\n[![Downloads](http://cranlogs.r-pkg.org/badges/prettyB?color=brightgreen)](https://cran.r-project.org/package=prettyB)\n\nAnyone who uses R Base graphics, have a 100 and 1 tweaks that they use to make the \nfigures more presentable. This package aims to capture the tweaks in one place. \n\n## Installation\n\nThe package is still being developed and the graphs are subject to change.\nThe package is on CRAN and can be installed in the usual way\n```{r eval = FALSE}\ninstall.packages(\"prettyB\")\n```\nTo install the dev version, try\n\n```{r, eval=FALSE}\ndevtools::install_github(\"jumpingrivers/prettyB\")\n```\nThe package can then be loaded in the usual way\n\n```{r, message=FALSE}\nlibrary(\"prettyB\")\n```\n\n## Usage\n\nAll plotting functions work exactly as before, with the same inputs. The difference \nis that the defaults have been changed. For example, compare\n\n```{r, plot-minimal,fig.width=12}\nop = par(mfrow = c(1, 2))\nplot(iris$Sepal.Length, iris$Sepal.Width)\nplot_p(iris$Sepal.Length, iris$Sepal.Width)\n```\n\nWhen you first call a __prettyB__, it changes the underlying `par()` and\n`palette()`. You can reset this via\n\n```{r}\nprettyB::reset_prettyB()\n```\n\nThe core idea of __prettyB__ is that no new arguments are introducted to the\nplot functions. This means, that no changes to existing code\nare required\n\n```{r, plot-minimal-full,fig.width=6, echo = -1}\nop = par(mfrow = c(1, 1))\nplot_p(iris$Sepal.Length, iris$Sepal.Width, \n     xlab = \"Length\", ylab = \"Width\",\n     main = \"The Iris data set\", \n     sub = \"I hate this data too\")\n```\n\n## Other plots\n\nThe package also prettifies other functions\n\n  * Histograms\n    ```{r, echo=c(-1, -2)}\n    prettyB::reset_prettyB()\n    par(mfrow = c(1, 2))\n    z = rt(100, 4)\n    hist(z, main = \"The t-distribution\")\n    hist_p(z, main = \"The t-distribution\")\n    ```\n  * barplots\n    ```{r, echo=-1}\n    par(mfrow = c(1, 2), cex = 0.9)\n    barplot(VADeaths, main = \"Death Rates in Virginia\")\n    barplot_p(VADeaths, main = \"Death Rates in Virginia\")\n    ```\n\n## Package Rationale\n\nThis package is __not__ a replacement for __ggplot2__ or other R related plotting packages. Instead, it has a few simple aims\n\n * provide package authors a low dependency method of making their plots look pretty\n * provide academics with a way of generating nice plots, but not worry about future changes in R\n * provide a simple way for improving the look and feel of plots in teaching\n\nSince the generated plots by __prettyB__ use standard base graphics, with no new arguments, this makes plots future proof. As a fall-back, just remove the `_p`.\n\nI picked up the general style a few years ago, but the book\n[Fundamentals of Data Visualization](https://www.amazon.com/Fundamentals-Data-Visualization-Informative-Compelling/dp/1492031089/) has made it a bit \nmore consist. The author also provided a free \n[online](https://serialmentor.com/dataviz/) version.\n\n## Other information\n\n * If you have any suggestions or find bugs, please use the github [issue tracker](https://github.com/jumpingrivers/prettyB/issues)\n * Feel free to submit pull requests\n\n---\n\nDevelopment of this package was supported by [Jumping Rivers](https://www.jumpingrivers.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjumpingrivers%2Fprettyb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjumpingrivers%2Fprettyb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjumpingrivers%2Fprettyb/lists"}