Skip to content

Commit

Permalink
v1.62
Browse files Browse the repository at this point in the history
  • Loading branch information
asjadnaqvi committed May 19, 2023
1 parent 0748e92 commit de96b6b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 40 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ authors:
- family-names: "Naqvi"
given-names: "Asjad"
title: "Stata package ``bimap''"
version: 1.61
date-released: 2023-04-12
version: 1.62
date-released: 2023-05-19
url: "https://github.com/asjadnaqvi/stata-bimap"
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

---

# bimap v1.61
# bimap v1.62

This 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).

Expand All @@ -22,7 +22,7 @@ The package can be installed from SSC (**v1.61**):
ssc install bimap, replace
```

Or it can be installed from GitHub (**v1.61**):
Or it can be installed from GitHub (**v1.62**):

```
net install bimap, from("https://raw.githubusercontent.com/asjadnaqvi/stata-bimap/main/installation/") replace
Expand Down Expand Up @@ -395,8 +395,12 @@ Please open an [issue](https://github.com/asjadnaqvi/stata-bimap/issues) to repo

## Change log

**v1.62 (19 May 2023)**
- Fixed bugs in legend labels (reported by Kit Baum). Minor improvements.


**v1.61 (12 Apr 2023)**
- Fixed a major bug in the legend. The boxes were not rescaling properly (reported by Faylosphie and Paul).
- Fixed a major bug in the legend. The boxes were not rescaling properly.

**v1.6 (17 Mar 2023)** (major update)
- Scalable color palettes.
Expand Down
36 changes: 13 additions & 23 deletions installation/bimap.ado
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*! bimap v1.61 (12 Apr 2023)
*! bimap v1.62 (19 May 2023)
*! Asjad Naqvi ([email protected])

* v1.62 (19 May 2023): Fix to legend labels and sizes. Minor improvements.
* v1.61 (12 Apr 2023): Fix to legend box and label rescaling.
* v1.6 (17 Mar 2023): Colors are now dynamically generated for any number of bins. several new options to control colors, bins, saturation, labels
* v1.51 (14 Nov 2022): Minor legend fixes
Expand Down Expand Up @@ -513,10 +514,7 @@ qui {


/////

di "xcategories = `xcats'"
di "ycategories = `ycats'"



local xlen : word count `xcats'
local ylen : word count `ycats'
Expand Down Expand Up @@ -607,20 +605,16 @@ qui {
}


if "`formatval'" =="" local formatval "%5.1f"
if "`formatval'" =="" local formatval "%5.1f"

if "`percent'" != "" {
gen mycount2 = string(mycount, "`formatval'") + "%" if mycount!=.

local marksym mycount2
}



// markers

di "xlist = `xlist'"
di "ylist = `ylist'"


// for x-axis
local xlen : word count `xcats'
local ylen : word count `ycats'
Expand Down Expand Up @@ -690,7 +684,7 @@ qui {
replace labn = "`textx'" in 1

replace labx = -0.2 in 2
replace laby = 0.65 in 2
replace laby = 0.8 in 2
replace labn = "`texty'" in 2


Expand All @@ -715,9 +709,9 @@ qui {
}

if "`values'" != "" {
local xvals (scatter y0 x_mark, mcolor(none) mlabel(x_val) mlabpos(6) mcolor(gs6) msize(0.2)) ///
local xvals (scatter y0 x_mark, mcolor(none) mlabel(x_val) mlabpos(6) mcolor(gs6) msize(0.2) mlabsize(`textlabsize')) ///

local yvals (scatter y_mark x0, mcolor(none) mlabel(y_val) mlabpos(9) mcolor(gs6) msize(0.2)) ///
local yvals (scatter y_mark x0, mcolor(none) mlabel(y_val) mlabpos(9) mcolor(gs6) msize(0.2) mlabsize(`textlabsize')) ///

}

Expand All @@ -742,13 +736,11 @@ qui {
legend(off) ///
name(_legend, replace) nodraw




restore

**** combine the two

********************
**** FINAL ****
********************

graph combine _map _legend, ///
imargin(zero) ///
Expand All @@ -757,9 +749,7 @@ qui {
`note' ///
`name'




}

end
Expand All @@ -768,7 +758,7 @@ end
// sub routines

*************************
// bimap_clrs //
// bimap_clrs //
*************************

cap program drop bimap_clrs
Expand Down
6 changes: 3 additions & 3 deletions installation/bimap.pkg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v 1.61
v 1.62
d {bf:BIMAP}: Bi-variate maps
d
d
Expand All @@ -8,9 +8,9 @@ d KW: Stata
d KW: graphs
d KW: map
d KW: bivariate map
d Distribution-Date: 20230316
d Distribution-Date: 20230519
d
d This version: 12 Apr 2023
d This version: 19 May 2023
d First version: 08 Apr 2022
d License: MIT
d
Expand Down
15 changes: 8 additions & 7 deletions installation/bimap.sthlp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{smcl}
{* 12Apr2023}{...}
{* 19May2023}{...}
{hi:help bimap}{...}
{right:{browse "https://github.com/asjadnaqvi/stata-bimap":bimap v1.61 (GitHub)}}
{right:{browse "https://github.com/asjadnaqvi/stata-bimap":bimap v1.62 (GitHub)}}

{hline}

Expand Down Expand Up @@ -163,8 +163,8 @@ Please see additional examples on {browse "https://github.com/asjadnaqvi/stata-b

{title:Package details}

Version : {bf:bimap} v1.61
This release : 12 Apr 2023
Version : {bf:bimap} v1.62
This release : 19 May 2023
First release: 08 Apr 2022
Repository : {browse "https://github.com/asjadnaqvi/stata-bimap":GitHub}
Keywords : Stata, map, bimap, bi-variate
Expand All @@ -179,7 +179,7 @@ Twitter : {browse "https://twitter.com/AsjadNaqvi":@AsjadNaqvi}
{title:Acknowledgements}

{p 4 4 2}
Faylosophie and Paul reported bug in the bimap v1.6 legends (v1.61).
Kit Baum, Fayssal Ayad, and Paul reported bug in the bimap v1.6 legends (v1.62, v1.61).
Tyson King-Meadows and Vishakha Agarwal requested a greyscale palette (v1.5).
Souradet Shaw requested scalebar and arrow passthrus (v1.5).
Paul Frissard Martínez requested spmap legend options (v1.4).
Expand All @@ -205,6 +205,7 @@ If you find bugs and/or have feature requests, then please open an {browse "http
{title:Other visualization packages}

{psee}
{helpb arcplot}, {helpb alluvial}, {helpb bimap}, {helpb circlebar}, {helpb circlepack}, {helpb clipgeo}, {helpb delaunay}, {helpb joyplot},
{helpb arcplot}, {helpb alluvial}, {helpb bimap}, {helpb bumparea}, {helpb bumpline}, {helpb circlebar}, {helpb circlepack}, {helpb clipgeo}, {helpb delaunay}, {helpb joyplot},
{helpb marimekko}, {helpb sankey}, {helpb schemepack}, {helpb spider}, {helpb streamplot}, {helpb sunburst}, {helpb treecluster}, {helpb treemap}



5 changes: 3 additions & 2 deletions installation/stata.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
v 1.61
v 1.62
d BIMAP: A package for creating bivariate maps.
d
d Asjad Naqvi
d Distribution-Date: 20230519
d
d Asjad Naqvi
d [email protected]
d https://medium.com/the-stata-guide
d https://github.com/asjadnaqvi/Stata-schemes
Expand Down

0 comments on commit de96b6b

Please sign in to comment.