{"id":26334505,"url":"https://github.com/asjadnaqvi/stata-bimap","last_synced_at":"2026-01-27T08:07:10.092Z","repository":{"id":113395572,"uuid":"480131067","full_name":"asjadnaqvi/stata-bimap","owner":"asjadnaqvi","description":"A Stata package for bi-variate maps","archived":false,"fork":false,"pushed_at":"2025-03-24T19:25:16.000Z","size":290568,"stargazers_count":64,"open_issues_count":3,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-01T23:39:20.247Z","etag":null,"topics":["ado","bimap","bivariate","graph","map","stata"],"latest_commit_sha":null,"homepage":"","language":"Stata","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asjadnaqvi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"asjadnaqvi"}},"created_at":"2022-04-10T20:23:29.000Z","updated_at":"2025-06-28T19:09:05.000Z","dependencies_parsed_at":"2024-05-04T12:27:42.834Z","dependency_job_id":"cab43a1b-3273-4ee2-b505-be5678ac1460","html_url":"https://github.com/asjadnaqvi/stata-bimap","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/asjadnaqvi/stata-bimap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bimap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bimap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bimap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bimap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asjadnaqvi","download_url":"https://codeload.github.com/asjadnaqvi/stata-bimap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asjadnaqvi%2Fstata-bimap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28809344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ado","bimap","bivariate","graph","map","stata"],"created_at":"2025-03-16T00:19:17.276Z","updated_at":"2026-01-27T08:07:10.085Z","avatar_url":"https://github.com/asjadnaqvi.png","language":"Stata","funding_links":["https://github.com/sponsors/asjadnaqvi"],"categories":[],"sub_categories":[],"readme":"![StataMin](https://img.shields.io/badge/stata-2015-blue) ![issues](https://img.shields.io/github/issues/asjadnaqvi/stata-bimap) ![license](https://img.shields.io/github/license/asjadnaqvi/stata-bimap) ![Stars](https://img.shields.io/github/stars/asjadnaqvi/stata-bimap) ![version](https://img.shields.io/github/v/release/asjadnaqvi/stata-bimap) ![release](https://img.shields.io/github/release-date/asjadnaqvi/stata-bimap)\n\n[Installation](#Installation) | [Syntax](#Syntax) | [Citation guidelines](#Citation-guidelines) | [Examples](#Examples) | [Feedback](#Feedback) | [Change log](#Change-log)\n\n---\n\n![bimap_banner_v2](https://github.com/asjadnaqvi/stata-bimap/assets/38498046/3d7415bd-ffba-4576-ba74-4a27921440ea)\n\n\n\n# bimap v2.3\n(14 Mar 2025)\n\nThis package provides the ability to draw bi-variate maps in Stata. It is based on the [Bi-variate maps Guide](https://medium.com/the-stata-guide/stata-graphs-bi-variate-maps-b1e96dd4c2be).\n\n\nAs of version 2.0 (released on 22nd August 2024), **bimap** uses **geoplot** for Stata versions 17 or newer, and **spmap** for Stata versions 16 or earlier. Users with newer versions can still opt to use the original **spmap** implementation by defining the original code (with minor changes, see below) and using the option `old`. Information on which version is detected and which map package is used can be displayed by using the `detail` option.\n\nAs more and more users switch to newer Stata versions, the **spmap** implementation will eventually be phased out. As of v2.0 it will no longer be developed further. \n\n## Installation\n\nThe package can be installed via SSC or GitHub. The GitHub version, *might* be more recent due to bug fixes, feature updates etc, and *may* contain syntax improvements and changes in *default* . See version numbers below. Eventually the GitHub version is published on SSC. All examples are updated to the latest version and might not be compatible with the old ones. Please check the documentation and change logs.\n\nThe package can be installed from SSC (**v2.3**):\n```\nssc install bimap, replace\n```\n\nOr it can be installed from GitHub (**v2.3**):\n\n```\nnet install bimap, from(\"https://raw.githubusercontent.com/asjadnaqvi/stata-bimap/main/installation/\") replace\n```\n\nFor using the command with `geoplot` the following packages are required:\n\n```stata\nssc install geoplot, replace\nssc install moremata, replace\nssc install palettes, replace\nssc install colrspace, replace\nssc install graphfunctions, replace\n``` \n\n\nFor using the command with `spmap` the following packages are required:\n\n```stata\nssc install spmap, replace\nssc install palettes, replace\nssc install colrspace, replace\nssc install graphfunctions, replace\n```\n\nEven if you have these packages installed, please check for updates: `ado update, update`.\n\n*Optional*: Users can also install the `geo2xy` package for projection transformations, even though `geoplot` supports projects internally as well:\n\n```stata\nssc install geo2xy, replace\n```\n\n\n*Optional*: If you want to make a clean figure, then it is advisable to load a clean scheme. I personally use the following:\n\n```\nssc install schemepack, replace\nset scheme white_tableau  \n```\n\nYou can also push the scheme directly into the graph using the `scheme(schemename)` option.\n\nI also prefer narrow fonts in figures with long labels. You can change this as follows:\n\n```\ngraph set window fontface \"Arial Narrow\"\n```\n\n\n## Syntax for Stata versions 17 or newer\n\nThe syntax for the latest version is as follows:\n\n```stata\n        bimap vary varx [if] [in], frame(name) [ geo(geoplot layers) geo(geoplot layers) geopost(options) palette(name) reverse clr0(str) clrx(str)\n               clry(str) clrsaturate(num) cut(pctile|equal) cutx(numlist) cuty(numlist) binsproper bins(num \u003e=2) binx(num \u003e=2) biny(num \u003e=2) no\n               count percent showlegend lcolor(str) lwidth(str) ndlc(str) ndfcolor(str) ndfsize(str) xdiscrete ydiscrete labxgap(num) labygap(num)\n               textx(str) texty(str) formatx(str) formaty(str) detail wrap(num) textsize(str) textlabsize(str) vallabsize(str) textcolor(str)\n               textlabcolor(str) vallabcolor(str) fxsize(num) fysize(num) scale(num) * ]\n```\n\nwith the following minimal syntax requirement:\n\n```\nbimap vary varx, frame(framename)\n```\n\n\n\n## Syntax for Stata versions 16 or older\n\n```stata\n        bimap vary varx [if] [in], shp(shapefile) [ old polygon(str) line(str) point(str) label(str) arrow(str) diagram(str) scalebar(str) palette(name)\n               reverse clr0(str) clrx(str) clry(str) clrsaturate(num) cut(pctile|equal) cutx(numlist) cuty(numlist) binsproper bins(num \u003e=2) binx(num\n               \u003e=2) biny(num \u003e=2)  count percent showlegend lcolor(str) lwidth(str) ndlc(str) ndfcolor(str) ndfsize(str) xdiscrete ydiscrete\n               labxgap(num) labygap(num) textx(str) texty(str) formatx(str) formaty(str) detail wrap(num) textsize(str) textlabsize(str) vallabsize(str)\n               textcolor(str) textlabcolor(str) vallabcolor(str) fxsize(num) fysize(num) scale(num) * ]\n```\n\nwith the following minimal syntax requirement:\n\n```stata\nbimap vary varx, shp(shapefile)\n```\n\nNote that v2.0 changes the use of the shapefile syntax. This might be a minor inconvinience for older users of bimap.\n\nSee `help bimap` for details.\n\n\n\n## Citation guidelines\nSoftware packages take countless hours of programming, testing, and bug fixing. If you use this package, then a citation would be highly appreciated. \n\nThe [SSC citation](https://ideas.repec.org/c/boc/bocode/s459063.html) is recommended. Please note that the GitHub version might be newer than the SSC version.\n\n\n\n## Examples\n\nThe examples showcase both the syntax for the use with `geoplot` (first syntax) and `spmap` (second syntax). The map outputs have been aligned to the extent possible but very minor differences in outputs might remain. Additionally, as `geoplot` is still in active development, output might break with latest updates or syntax might change. Please report these as soon as possible.\n\nSince I am using Stata 18+, I have to specify `old` option to pass the syntax to use `spmap`. This might be uncessary if you have older Stata versions.\n\nUsers can either download the files from [GIS](./GIS/) and dump them in a folder or directly get them from Stata:\n\nSet up the data:\n\n```stata\ncd \u003cchange path to the working directory\u003e\n\nforeach x in county county_shp2 state state_shp2 usa_county2 {\n\tcopy \"https://github.com/asjadnaqvi/stata-bimap/raw/main/GIS/`x'.dta\" \"`x'.dta\", replace\n}\n```\n\n\n\nTest whether the `geoplot` is working properly. First set up the layer frames:\n\n\n```stata\n// create the geoframes\ngeoframe create county, replace shp(county_shp2)\ngeoframe create state, replace shp(state_shp2)\ngeoframe create cities usa_county2, replace shp(county_shp2)  // minor example of pairing with point location data. \n\n// make the country frame active\nframes change county \n\n\ndestring _all, replace\nmerge 1:1 STATEFP COUNTYFP using county_race\nkeep if _m==3\ndrop _m\t\n```\n\n```stata\ngeoplot (area county share_afam) (line state)\n```\n\n\u003cimg src=\"/figures/geoplot_test.png\" width=\"100%\"\u003e\n\n\nTest whether the `spmap` is working properly:\n\n\n```stata\nspmap share_afam using county_shp2, id(_ID) clm(custom) clb(0(10)100) fcolor(Heat)\n```\n\n\u003cimg src=\"/figures/bimap1_1.png\" width=\"100%\"\u003e\n\n\n## Basic bimap\n\nLet's test the `bimap` command:\n\n```stata\nbimap share_hisp share_afam, frame(county) cut(pctile) palette(pinkgreen) \n```\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(pinkgreen)\n```\n\n\u003cimg src=\"/figures/bimap2_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap2.png\" width=\"100%\"\u003e\n\n\n```stata\nbimap share_hisp share_afam , frame(county) cut(pctile) palette(pinkgreen) count \n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(pinkgreen) count \n```\n\n\u003cimg src=\"/figures/bimap2_1_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap2_1.png\" width=\"100%\"\u003e\n\n\n\n```stata\nbimap share_hisp share_afam , cut(pctile) palette(pinkgreen) percent  frame(county).\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(pinkgreen) percent \n```\n\n\u003cimg src=\"/figures/bimap2_1_1_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap2_1_1.png\" width=\"100%\"\u003e\n\n\n```stata\nbimap share_hisp share_afam, frame(county) cut(equal) palette(pinkgreen) count \n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(equal) palette(pinkgreen) count \n```\n\n\u003cimg src=\"/figures/bimap2_2_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap2_2.png\" width=\"100%\"\u003e\n\n\n### Legacy palettes\n\nThese old palettes can still be used and will default to 3x3 bins.\n\n\n```stata\nlocal i = 1\n\nforeach x in pinkgreen0 bluered0 greenblue0 purpleyellow0 yellowblue0 orangeblue0 brew1 brew2 brew3 census rgb viridis gscale {\n\n\t\tbimap share_hisp share_afam, frame(county) cut(pctile) palette(`x') percent title(\"Legacy scheme: `x'\") \n\n\t\t\tlocal ++i\n}\n```\n\n```stata\nlocal i = 1\n\nforeach x in pinkgreen0 bluered0 greenblue0 purpleyellow0 yellowblue0 orangeblue0 brew1 brew2 brew3 census rgb viridis gscale {\n\n\t\tbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(`x') percent title(\"Legacy scheme: `x'\") \n\n\t\tlocal ++i\n}\n```\n\n\u003cimg src=\"/figures/bimap3_1.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_2.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_3.png\" height=\"250\"\u003e\n\u003cimg src=\"/figures/bimap3_4.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_5.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_6.png\" height=\"250\"\u003e\n\u003cimg src=\"/figures/bimap3_7.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_8.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_9.png\" height=\"250\"\u003e\n\u003cimg src=\"/figures/bimap3_10.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_11.png\" height=\"250\"\u003e\u003cimg src=\"/figures/bimap3_12.png\" height=\"250\"\u003e\n\u003cimg src=\"/figures/bimap3_13.png\" height=\"250\"\u003e\n\n\n### Advanced examples\n\n```\nbimap share_asian share_afam, cut(pctile) palette(bluered) frame(county)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\") texts(3.5) textlabs(3)  count ///\n\t\t lw(none) geo((line state)) \n```\n\n\n```\nbimap share_asian share_afam, shp(county_shp2) old cut(pctile) palette(bluered)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\") texts(3.5) textlabs(3)  count ///\n\t\t lc() lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(white) osize(0.3))\n```\n\n\u003cimg src=\"/figures/bimap4_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap4.png\" width=\"100%\"\u003e\n\n\n```\nbimap share_asian share_afam, cut(pctile) palette(orangeblue) frame(county)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\") texts(3.5) textlabs(3)  count ///\n\t\t lw(none) geo((line state, lc(white) lw(0.2)))  \n```\n\n\n\n```stata\nbimap share_asian share_afam, shp(county_shp2) old cut(pctile) palette(yellowblue)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\") texts(3.5) textlabs(3)  count lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap6_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap6.png\" width=\"100%\"\u003e\n\n\n```stata\nbimap share_asian share_hisp, cut(pctile) palette(orangeblue) frame(county)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of Hispanics\") texty(\"Share of Asians\") texts(3.5) textlabs(3)  count ///\n\t\t lw(none) geo((line state, lc(black) lw(0.2)))  \n```\n\n\n```stata\nbimap share_asian share_hisp, shp(county_shp2) old cut(pctile) palette(orangeblue)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of Hispanics\") texty(\"Share of Asians\") texts(3.5) textlabs(3)  count lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap7_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap7.png\" width=\"100%\"\u003e\n\n\n\n### Passing advanced options\n\n\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(pinkgreen) percent  frame(county)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") ///\n\tnote(\"Data from the US Census Bureau. Counties with population \u003e 100k plotted as proportional dots.\", size(1.8)) ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Hispanics\") texts(3.5) textlabs(3) lw(none) ///\n\t\t geo( (line state, lc(black) lw(0.2))  (point cities [w = tot_pop] if tot_pop\u003e1e5, mc(lime%80) msize(0.8) lc(black))  )  \n```\n\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(pinkgreen) percent  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") ///\n\tnote(\"Data from the US Census Bureau. Counties with population \u003e 100k plotted as proportional dots.\", size(1.8)) ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Hispanics\") texts(3.5) textlabs(3) lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(white) osize(0.3)) ///\n\t\t point(data(\"usa_county2\") x(_CX) y(_CY) select(keep if tot_pop\u003e100000) proportional(tot_pop) psize(absolute) fcolor(lime%85) lc(black) lw(0.12) size(0.9) )  \n```\n\n\n\u003cimg src=\"/figures/bimap8_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap8.png\" width=\"100%\"\u003e\n\n\n\n### v1.4 updates\n\nLet's make a `bimap` with percentiles as cut-offs and percentages shown in boxes:\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) frame(county)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  percent  ///\n\t\t\tlw(none) geo((line state, lc(black) lw(0.2)))  \n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) percent lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap9_0_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap9_0.png\" width=\"100%\"\u003e\n\n\n### Custom cut-offs (v1.8)\n\nwe can now modify the cut-offs as follows:\n\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) frame(county)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  percent  ///\n\t\t\tlw(none) geo((line state, lc(black) lw(0.2)))  \n```\n\n\n```\nbimap share_hisp share_afam, shp(county_shp2) old cuty(0(20)100) cutx(0(20)100)  palette(orangeblue)    ///\n\t\t note(\"Data from the US Census Bureau.\") ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  percent  lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap9_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap9.png\" width=\"100%\"\u003e\n\n\nCut-offs can be formatted as follows:\n\n\n```\nbimap share_hisp share_afam, cuty(0(25)100) cutx(0(25)100)  formatx(%3.0f) formaty(%3.0f)  palette(orangeblue) frame(county)    ///\n\t\t note(\"Data from the US Census Bureau.\") ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  count  ///\n\t\t\tlw(none) geo((line state, lc(black) lw(0.2)))\n```\n\n\n```\nbimap share_hisp share_afam, shp(county_shp2) old cuty(0(25)100) cutx(0(25)100)  formatx(%3.0f) formaty(%3.0f)  palette(orangeblue)    ///\n\t\t note(\"Data from the US Census Bureau.\") ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  count  ///\n\t\t lc() lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap11_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap11.png\" width=\"100%\"\u003e\n\n\nIf we define only one custom cut-off, the other will automatically take on the pctile :\n\n\n```\nbimap share_hisp share_afam, cutx(0 2 6 100) formatx(%5.0f)   palette(orangeblue) frame(county)    ///\n\t\t note(\"Data from the US Census Bureau.\") ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  percent  ///\n\t\tlw(none) geo((line state, lc(black) lw(0.2)))\n```\n\n\n```\nbimap share_hisp share_afam, shp(county_shp2) old cutx(0 2 6 100) formatx(%5.0f)   palette(orangeblue)    ///\n\t\t note(\"Data from the US Census Bureau.\") ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3)  percent  ///\n\t\t lc() lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap10_geo.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap10.png\" width=\"100%\"\u003e\n\n\n### legend checks + offset (v1.8)\n\n\n\n```\nbimap share_hisp share_afam, cut(pctile) palette(census) frame(county)  ///\n\t\t note(\"Data from the US Census Bureau.\", size(small)) ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.2) textlabs(3)  percent labxgap(0.05) labygap(0.05) ///\n\t\t lc(black) lw(0.03)  ///\n\t\t geo((line state, lc(black) lw(0.2))) showlegend ///\n\t\t geopost( ///\n\t\t\tcompass ///\n\t\t\tsbar(length(1000) units(km) position(sw)) ///\n\t\t\t)\t\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(census)  ///\n\t\t note(\"Data from the US Census Bureau.\", size(small)) ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.2) textlabs(3)  percent ///\n\t\t lc(black) lw(0.03)  ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2) legenda(on) leglabel(State boundaries))  ///\n\t\t scalebar(units(500) scale(1/1000) xpos(100) label(Kilometers)) ///\n\t\t showleg legenda(off) legend(pos(7) size(5)) legstyle(2) \n```\n\n\n\u003cimg src=\"/figures/bimap12_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap12.png\" width=\"100%\"\u003e\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(census)  ///\n\t\t note(\"Data from the US Census Bureau.\", size(small)) ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.2) textlabs(3)  percent labxgap(0.05)  labygap(0.05) ///\n\t\t lc(black) lw(0.03)  ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2) legenda(on) leglabel(State boundaries))  ///\n\t\t scalebar(units(500) scale(1/1000) xpos(100) label(Kilometers)) ///\n\t\t showleg legenda(off) legend(pos(7) size(5)) legstyle(2) \n```\n\n\n\u003cimg src=\"/figures/bimap12_1.png\" width=\"100%\"\u003e\n\n\n### new legend checks (v1.9)\n\nCheck for legend color options:\n\n```\nbimap share_asian share_afam, cut(pctile) frame(county)   ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\")  count textcolor(lime) textlabcolor(blue) vallabc(red) lw(none) ///\n\t\t geo((line state, lc(white) lw(0.3)))\n```\n\n\n```\nbimap share_asian share_afam, shp(county_shp2) old cut(pctile)   ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\")  count textcolor(lime) textlabcolor(blue) vallabc(red) lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(white) osize(0.3))\n```\n\n\u003cimg src=\"/figures/bimap12_2_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap12_2.png\" width=\"100%\"\u003e\n\n\nCheck for label wrapping in the legend:\n\n\n```stata\nbimap share_asian share_afam, cut(pctile) frame(county)    ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\") wrap(16) count lw(none) ///\n\t\t geo((line state, lc(white) lw(0.3)))\n```\n\n```stata\nbimap share_asian share_afam, shp(county_shp2) old cut(pctile)   ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") ///\t\n\t\t textx(\"Share of African Americans\") texty(\"Share of Asians\") wrap(16)  count lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(white) osize(0.3))\n```\n\n\n\u003cimg src=\"/figures/bimap12_3_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap12_3.png\" width=\"100%\"\u003e\n\nCheck for hiding the legend:\n\n```stata\nbimap share_asian share_afam, cut(pctile) frame(county)  ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") lw(none) ///\n\t\t geo((line state, lc(white) lw(0.3))) nolegend\n```\n\n\n```stata\nbimap share_asian share_afam, shp(county_shp2) old cut(pctile)   ///\n\ttitle(\"{fontface Arial Bold:A Stata bivariate map}\") note(\"Data from the US Census Bureau.\") lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(white) lw(0.3)) nolegend\n```\n\n\n\u003cimg src=\"/figures/bimap12_4_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap12_4.png\" width=\"100%\"\u003e\n\n\n### v1.5 updates\n\nIf condition checks with legends\n\n```stata\nbimap share_hisp share_afam if STATEFP==36, cut(pctile) palette(census) frame(county)   ///\n\t\t title(\"New York\") ///\n\t\t note(\"Data from the US Census Bureau.\", size(small)) ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.2) textlabs(3)  percent ///\n\t\t lc(black) lw(0.03)  ///\n\t\t geo((line state if _ID==19, lc(black) lw(0.2))) nolegend\n```\n\n\n```stata\nbimap share_hisp share_afam if STATEFP==36, shp(county_shp2) old cut(pctile) palette(census)  ///\n\t\t title(\"New York\") ///\n\t\t note(\"Data from the US Census Bureau.\", size(small)) ///\t\n\t\t texty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.2) textlabs(3) percent ///\n\t\t lc(black) lw(0.03)  ///\n\t\t polygon(data(\"state_shp2\") select(keep if _ID==19) ocolor(black) osize(0.2) legenda(on) leglabel(State boundaries))  ///\n\t\t showleg legenda(off) legend(pos(7) size(5)) legstyle(2)\n```\n\n\u003cimg src=\"/figures/bimap13_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap13.png\" width=\"100%\"\u003e\n\n\n### v1.6 updates\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) bins(5) frame(county) ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) bins(5)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\tpolygon(data(\"state_shp2\") osize(black) ocolor(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap15_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap15.png\" width=\"100%\"\u003e\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) binx(4) biny(5) frame(county)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) binx(4) biny(5)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\tpolygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap16_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap16.png\" width=\"100%\"\u003e\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) binx(3) biny(8) frame(county)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) binx(3) biny(8)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\n\n\u003cimg src=\"/figures/bimap17_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap17.png\" width=\"100%\"\u003e\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) bins(8) frame(county)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) bins(8)   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) lc() lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.1)) \n```\n\n\u003cimg src=\"/figures/bimap18_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap18.png\" width=\"100%\"\u003e\n\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) bins(8) frame(county)  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) reverse bins(8)   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap19_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap19.png\" width=\"100%\"\u003e\n\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) clr0(white) clrx(red) bins(6) clrsat(10) frame(county)   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) clr0(white) clrx(red) bins(6) clrsat(10)   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap20_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap20.png\" width=\"100%\"\u003e\n\n```stata\nbimap share_hisp share_afam, cut(pctile) palette(orangeblue) bins(4)  percent frame(county)   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) lw(none) ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cut(pctile) palette(orangeblue) bins(4)  percent  ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) lw(none) ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap21_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap21.png\" width=\"100%\"\u003e\n\n\n### showing proper bins (v1.6)\n\nBins can be scaled to show actual division. Use this cautiously especially if the data distribution is highly skewed. \n\n\n```stata\nbimap share_hisp share_afam, cuty(0 20 60 100) cutx(0 30 50 75 100) palette(orangeblue) formatx(%5.0f)  formaty(%5.0f) binsproper frame(county)   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\tgeo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old cuty(0 20 60 100) cutx(0 30 50 75 100) palette(orangeblue) formatx(%5.0f)  formaty(%5.0f) binsproper   ///\n\t\tnote(\"Data from the US Census Bureau.\") ///\t\n\t\ttexty(\"Share of Hispanics\") textx(\"Share of African Americans\") texts(3.5) textlabs(3) count lw(none) ///\n\t\tpolygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap22_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap22.png\" width=\"100%\"\u003e\n\n\n### discrete variables (v1.7)\n\nLet's make some variables discrete:\n\n```\nxtile discx = share_afam, n(4)\ngen discy = share_hisp \u003c 10\n\n\nlab de dx 1 \"Catx 1\" 2 \"Catx 2\" 3 \"Catx 3\" 4 \"Catx 4\"\nlab val discx dx\n\nlab de dy 0 \"Caty 0\" 1 \"Caty 1\" \nlab val discy dy\n\n\ntab discy discx, m\n```\n\nWe can also now declare these variables as discrete while using `bimap` in any combination:\n\n```stata\nbimap discy share_afam, palette(yellowblue) count ydisc frame(county) \n```\n\n\n```stata\nbimap discy share_afam, shp(county_shp2) old palette(yellowblue) count ydisc\n```\n\n\u003cimg src=\"/figures/bimap23_1.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap23_1_geoplot.png\" width=\"100%\"\u003e\n\n \n```stata\nbimap share_hisp discx, palette(yellowblue) count xdisc frame(county) \n``` \n \n\n```stata\nbimap share_hisp discx, shp(county_shp2) old palette(yellowblue) count xdisc\n```\n\n\u003cimg src=\"/figures/bimap23_2_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap23_2.png\" width=\"100%\"\u003e\n\n```stata\nbimap discy discx, palette(yellowblue) count xdisc ydisc frame(county) \n```\n\n\n```stata\nbimap discy discx, shp(county_shp2) old palette(yellowblue) count xdisc ydisc\n```\n\n\u003cimg src=\"/figures/bimap23_3_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap23_3.png\" width=\"100%\"\u003e\n\n\n### statvar() (v2.3)\n\nWe can now summarize a vector level variable, e.g. population in county in our example, rather than count of countries. This might be more meaningful especially if population sizes vary considerably.\n\n```\nreplace tot_pop = tot_pop / 1e6\n\nsumm tot_pop\ndi \"`r(sum)'\"\n```\n\nwhich shows a population of approximately 329 million. Here is a comparison of with defining the `statvar()` option. If we just specify `count`, we get the sum of population for each category:\n\n```stata\nbimap share_hisp share_afam, palette(orangeblue)  frame(county)  ///\n\t\t ndfcolor(pink) ndocolor(lime) ndsize(0.2)  count  ///\n\t\t geo((line state, lc(black) lw(0.2))) \t \n\t\t \nbimap share_hisp share_afam, palette(orangeblue)  frame(county)  ///\n\t\t ndfcolor(pink) ndocolor(lime) ndsize(0.2)  count  ///\n\t\t geo((line state, lc(black) lw(0.2))) statvar(tot_pop)\t\t\t \n```\n\nWhere the summ of cells in the second map now equals total population:\n\n\u003cimg src=\"/figures/bimap25_statvar1.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap25_statvar2.png\" width=\"100%\"\u003e\n\nWe can similarly use `percentage` to compare count-weighted cells versus population-weighted cells:\n\n```stata\nbimap share_hisp share_afam, palette(orangeblue) frame(county)  ///\n\t\t ndfcolor(pink) ndocolor(lime) ndsize(0.2)  percent  ///\n\t\t geo((line state, lc(black) lw(0.2))) \n\t\t \nbimap share_hisp share_afam, palette(orangeblue) frame(county)  ///\n\t\t ndfcolor(pink) ndocolor(lime) ndsize(0.2)  percent  ///\n\t\t geo((line state, lc(black) lw(0.2))) statvar(tot_pop)\t\t\n```\n\nAnd observe that shares change quite a bit:\n\n\u003cimg src=\"/figures/bimap25_statvar3.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap25_statvar4.png\" width=\"100%\"\u003e\n\n### missing data (v1.81)\n\n```stata\nreplace share_hisp = . if stname==\"Texas\"\n```\n\n```stata\nbimap share_hisp share_afam, palette(orangeblue)  frame(county)  ///\n\t\t ndfcolor(pink) ndlc(lime) ndsize(0.2) count  ///\n\t\t geo((line state, lc(black) lw(0.2)))\n```\n\n\n```stata\nbimap share_hisp share_afam, shp(county_shp2) old palette(orangeblue)    ///\n\t\t ndfcolor(pink) ndlc(lime) ndsize(0.3) count  ///\n\t\t polygon(data(\"state_shp2\") ocolor(black) osize(0.2)) \n```\n\n\u003cimg src=\"/figures/bimap24_geoplot.png\" width=\"100%\"\u003e\n\n\u003cimg src=\"/figures/bimap24.png\" width=\"100%\"\u003e\n\n## Feedback\n\nPlease open an [issue](https://github.com/asjadnaqvi/stata-bimap/issues) to report errors, feature enhancements, and/or other requests. \n\n\n## Change log\n\n**v2.3 (14 Mar 2025)**\n- New option `statvar()` added that now allows us to summarize each cell by a sum of the underlying variable. E.g. population counts might make more sense than cell counts. Many thanks to **Minh Nguyen** for the amazing suggestion.\n- Option `formatval()` is now just `format()`. This modifies the format of the cells and now the universal default if `format(%5.1f)`. \n- Minor code improvements.\n\n**v2.2 (23 Feb 2025)**\n- Legend labels are now shown be default. Previously, these had to be enabled via the `values` option. This has been replace with `novalue`, which now turns off the labels.\n- `ocolor()` and `osize()` have been changed to `lcolor()` and `lwidth()` to align it with standard Stata use. No data options remain as they are (for now) since these are only used in `spmap` currently. Please note that this change also makes the use of `bimap` with `bimap` a bit convoluted since secondary layers passed on as `polygon()` would still require the default `osize()` and `ocolor()` options. See examples above.\n- `xscale()` and `yscale()` renamed to `fxsize()` and `fysize()` the correct options for Stata. These were also reworked to allow for proper lagend scaling. Defaults also updated.\n- Option `scale()` added to allow easy scaling of legend text. \n- Added `geopre()` that allows users to draw layers underneath the bimap layer. This is in constrast to `geo()` that draws layers on top of the bimap layer.\n- Option `tight`, a default in the backgroud has been removed. Users now have to specify it additionally as `geopost(tight)`. \n- Many other bug fixes.\n\n**v2.1 (18 Oct 2024)**\n- Supporting for better label wrapping added using `graphfunctions`. The latest version of this package is required.\n- Minor syntax cleanups.\n\n**v2.0 (22 Aug 2024)**\n- Major update. Support for `geoplot` for Stata versions 17 or newer. Support for `spmap` for Stata versions 16 or older. Versions are auto detected.\n- Stata 17 or newer users can use the option `old` to call in the `spmap` version. This ensures that the code of seasoned `bimap` users does not break.\n- Minor change in syntax for `spmap` versions from `bimap y x using shapefile` to `bimap y x, shp(shapefile)`. This is to ensure consistency for upcoming releases.\n- Option `detail` added to show which Stata version is detected and which map program is used. This might be useful in case you want to have more information. \n\n**v1.9 (19 Jun 2024)**\n- Fixed and added several options to control legends: `textcolor()`, `textlabcolor()`, `vallabcolor()`. \n- Better options for `textsize()`, `textlabsize()`, `vallabsize()`.\n- Added `wrap()` to wrap labels in legends.\n- Added `nolegend` option to generate maps without a bi-variate legend. This is useful is several maps are being generated with a controlled legend and need to be combined in one figure.\n- Several improvements to graph passthru options.\n\n**v1.82 (04 May 2024)**\n- Added `textcolor()` to control random colors appearing in legend labels under some schemes.\n- Backend improvements to some defaults.\n\n**v1.81 (22 Aug 2023)**\n- Fixed a bug where missing data points where getting dropped (reported by Steve Johnson).\n- Fixed passthru of the `ndisze()` option.\n\n**v1.8 (26 Jun 2023)**\n- Changed the ways `cutx()` and `cuty()` are calculated (requested by Paul Hufe). These now take on lists which are used as provided.\n- Removed `textgap()` that was left over from the old legend code.\n- Added `labxgap()` and `labygap()` to allows users to offset the labels and improved the position of the legend axes titles.\n- Various improvements including \n\n**v1.7 (15 Jun 2023)**\n- Added two new options `xdiscrete` and `ydiscrete` to support discrete variables.\n\n**v1.62 (19 May 2023)**\n- Fixed bugs in legend labels (reported by Kit Baum). Minor improvements.\n\n**v1.61 (12 Apr 2023)**\n- Fixed a major bug in the legend. The boxes were not rescaling properly.\n\n**v1.6 (17 Mar 2023)** (major update)\n- Scalable color palettes.\n- Customizable bins.\n- Customizable colors.\n- Dynamic scalable legends.\n- Option for proper spacing of bins on legends.\n- Several defaults and checks added.\n- Several quality of life adjustments to make `bimap` easier to use.\n\n**v1.51 (14 Nov 2022)** \n- Minor fixes to legend text options.\n\n**v1.5 (05 Nov 2022)**\n- Three new palettes added: `rgb`, `viridis`, `gscale`.\n- Added `spmap` passthru options for `arrow`, `diagram`, and `scalebar`.\n\n**v1.4 (04 Oct 2022)**\n- Added the option to add custom cut-offs.\n- Added the option to format cut-offs,\n- Added the option to show default `spmap` legends.\n- Code clean up. New error checks.\n\n**v1.33 (29 Sep 2022)**\n- Bug fixes to `spmap` passthru options.\n- Add a new option `textgap` to allow adjustment of the distance of axes labels to the legend.\n\n**v1.32 (19 Aug 2022)**\n- Fixed an error in variable name comparisons (thanks to Cristian Jordan Diaz).\n\n**v1.31 (20 Jun 2022)**\n- Error fix in cut-offs skipping the last shape file (thanks to Mattias Öhman).\n- Fixed color assignments to the 3x3 groups. If a group was missing, the colors were wrongly assigned.\n\n**v1.3 (26 May 2022)**\n- Percent option added to legend to show box share (thanks to Kit Baum).\n- Legend corner label made lighter for visibility.\n- Four special use palettes added: `brew1`, `brew2`, `brew3`, `brew4`, `census`.\n\n**v1.2 (29 Apr 2022)**\n- Fixed a bug in cut-off groupings (thanks to Ruth Watkinson).\n- Error in how cut-off  are collected is fixed.\n- Two palettes added  `yellowblue`, `orangeblue`. If you have more palette suggestions, then please let me know!\n- Several `spmap` additional layer commands added as passthru options (thanks to Pierre-Henri Bono).\n- Count of each category added as an option.\n- Several bug fixes and error checks added.\n\n**v1.1 (14 Apr 2022)**\n- Errors in ado file corrected.\n- Help file was missing a couple of options.\n\n**v1.0 (08 Apr 2022)**\n- Public release.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasjadnaqvi%2Fstata-bimap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasjadnaqvi%2Fstata-bimap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasjadnaqvi%2Fstata-bimap/lists"}