{"id":13712382,"url":"https://jiaxiangbu.github.io/add2ggplot/","last_synced_at":"2025-05-06T22:31:08.773Z","repository":{"id":56936511,"uuid":"176868456","full_name":"JiaxiangBU/add2ggplot","owner":"JiaxiangBU","description":"The goal of add2ggplot is to add more theme for your ggplot object.","archived":false,"fork":false,"pushed_at":"2020-02-08T12:07:58.000Z","size":518,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T23:32:09.312Z","etag":null,"topics":["ggplot-extension","ggplot2-theme"],"latest_commit_sha":null,"homepage":"https://jiaxiangbu.github.io/add2ggplot/","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/JiaxiangBU.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}},"created_at":"2019-03-21T04:13:13.000Z","updated_at":"2021-01-19T23:46:50.000Z","dependencies_parsed_at":"2022-08-21T01:10:27.566Z","dependency_job_id":null,"html_url":"https://github.com/JiaxiangBU/add2ggplot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiaxiangBU%2Fadd2ggplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiaxiangBU%2Fadd2ggplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiaxiangBU%2Fadd2ggplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiaxiangBU%2Fadd2ggplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JiaxiangBU","download_url":"https://codeload.github.com/JiaxiangBU/add2ggplot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252778973,"owners_count":21802860,"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":["ggplot-extension","ggplot2-theme"],"created_at":"2024-08-02T23:01:17.824Z","updated_at":"2025-05-06T22:31:08.314Z","avatar_url":"https://github.com/JiaxiangBU.png","language":"R","funding_links":[],"categories":["Themes and aesthetics"],"sub_categories":[],"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\n# add2ggplot\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/add2ggplot)](https://CRAN.R-project.org/package=add2ggplot)\n[![DOI](https://zenodo.org/badge/176868456.svg)](https://zenodo.org/badge/latestdoi/176868456)\n\u003c!-- badges: end --\u003e\n\nThe goal of add2ggplot is to add more theme for your ggplot object.\n\n## Installation\n\nYou can install the released version of add2ggplot from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"add2ggplot\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"JiaxiangBU/add2ggplot\")\n```\n## Examples\n\n```{r}\nlibrary(add2ggplot)\n```\n\n```{r}\nplot_logo \u003c- add_logo(\n  plot_path = \"inst/extdata/logo.png\",\n  logo_path = \"inst/extdata/jiaxiang.png\",\n  logo_position = \"bottom right\",\n  logo_scale = 5)\nplot_logo\n```\n\n\n```{r}\nlibrary(ggrepel)\ndf \u003c- \nmtcars %\u003e%\n    tibble::rownames_to_column()\n```\n\n```{r}\ndf %\u003e%\n    ggplot() +\n    aes(mpg, disp, label = rowname) +\n    geom_point(color = 'white') +\n    # geom_label_repel use fill arg in the segments.\n    geom_label_repel(\n        data = function(x)\n            df %\u003e% head,\n        arrow = arrow(length = unit(0.02, \"npc\")),\n        box.padding = 1,\n        segment.color = white_one,\n        color = white_one,\n        label.size = NA,\n        fill = red_two,\n        aes(face = \"bold\")\n    ) +\n    # theme_white()\n    theme_grey_and_red() +\n    labs(\n        title = '浣跨敤labs瑕嗙洊',\n        subtitle = '浣跨敤labs瑕嗙洊',\n        x = '浣跨敤labs瑕嗙洊',\n        y = '浣跨敤labs瑕嗙洊',\n        caption = '澶囨敞: 浣跨敤labs瑕嗙洊'\n    )\n```\n\n\n```{r}\nz \u003c-\n    ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, col = Species)) +\n    geom_jitter(alpha = 0.7) +\n    scale_color_brewer(\n        \"Species\",\n        palette = \"Dark2\",\n        labels = c(\"Setosa\",\n                   \"Versicolor\",\n                   \"Virginica\")\n    ) +\n    scale_y_continuous(\"Width (cm)\",\n                       limits = c(2, 4.5),\n                       expand = c(0, 0)) +\n    scale_x_continuous(\"Length (cm)\", limits = c(4, 8), expand = c(0, 0)) +\n    ggtitle(\"Sepals\") +\n    coord_fixed(1)\n```\n\n\n```{r}\nz\nz + theme_classic()\nz + theme_classic2()\n```\n\n## Citations\n\n```{r include=FALSE}\ncitations \u003c- add2pkg::add_zenodo_citation(\"README.Rmd\")\n```\n\n```{r echo=FALSE, results='asis'}\ncat(citations$Cite)\n```\n\n```{r echo=FALSE, results='asis'}\ncat(paste0(\"```BibTex\\n\",citations$BibTex,\"\\n```\"))\n```\n\n```{r echo=FALSE, results='asis'}\ncat(citations$Comments)\n```\n\n\n`r add2pkg::add_disclaimer(\"Jiaxiang Li;Nakagawara Ryo\")`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/jiaxiangbu.github.io%2Fadd2ggplot%2F","html_url":"https://awesome.ecosyste.ms/projects/jiaxiangbu.github.io%2Fadd2ggplot%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/jiaxiangbu.github.io%2Fadd2ggplot%2F/lists"}