From 072092eb807029b219b89cf3471a8db7b6152374 Mon Sep 17 00:00:00 2001 From: Asjad Naqvi Date: Sat, 24 Aug 2024 08:40:22 +0200 Subject: [PATCH] v2.0 minor fixes --- README.md | 6 +++--- installation/bimap.ado | 6 +++--- installation/bimap.sthlp | 14 ++++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1ff3e85..3dd833c 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ bimap vary varx [if] [in], frame(name) palette(name) reverse clr0(str) clrx(str) clry(str) clrsaturate(num) cut(pctile|equal) cutx(numlist) cuty(numlist) binsproper bins(num >=2) binx(num >=2) biny(num >=2) values count percent showlegend ocolor(str) osize(str) ndocolor(str) ndfcolor(str) ndfsize(str) xdiscrete ydiscrete - labxgap(num) labygap(num) textx(str) texty(str) formatx(str) formaty(str) + labxgap(num) labygap(num) textx(str) texty(str) formatx(str) formaty(str) detail textsize(str) textlabsize(str) vallabsize(str) textcolor(str) textlabcolor(str) vallabcolor(str) xscale(num) yscale(num) * ] ``` @@ -109,7 +109,7 @@ bimap vary varx [if] [in], shp(shapefile) palette(name) reverse clr0(str) clrx(str) clry(str) clrsaturate(num) cut(pctile|equal) cutx(numlist) cuty(numlist) binsproper bins(num >=2) binx(num >=2) biny(num >=2) values count percent showlegend ocolor(str) osize(str) ndocolor(str) ndfcolor(str) ndfsize(str) xdiscrete ydiscrete - labxgap(num) labygap(num) textx(str) texty(str) formatx(str) formaty(str) + labxgap(num) labygap(num) textx(str) texty(str) formatx(str) formaty(str) detail textsize(str) textlabsize(str) vallabsize(str) textcolor(str) textlabcolor(str) vallabcolor(str) xscale(num) yscale(num) * ] ``` @@ -933,8 +933,8 @@ Please open an [issue](https://github.com/asjadnaqvi/stata-bimap/issues) to repo **v2.0 (22 August 2024)** - Major update. Support for `geoplot` for Stata versions 17 or newer. Support for `spmap` for Stata versions 16 or older. Versions are auto detected. -- 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. - 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. +- 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. - 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. **v1.9 (19 June 2024)** diff --git a/installation/bimap.ado b/installation/bimap.ado index 9db16f8..4aca1b7 100644 --- a/installation/bimap.ado +++ b/installation/bimap.ado @@ -50,7 +50,7 @@ program bimap, sortpreserve [ XDISCrete YDISCrete ] /// // v1.7 options [ labxgap(real 0) labygap(real 0) ] /// // v1.8 options [ TEXTColor(string) TEXTLABColor(string) VALLABColor(string) NOLEGend wrap(numlist >=0 max=1) * ] /// // v1.82, v1.9 - [ geo(string) geopost(string) frame(string) old shp(string) details ] // v2.0 -- stata 18+ options for geoplot + [ geo(string) geopost(string) frame(string) old shp(string) detail ] // v2.0 -- stata 18+ options for geoplot local myver = `c(version)' @@ -60,7 +60,7 @@ program bimap, sortpreserve if `myver' >= 17 & "`old'"=="" { - if "`details'" != "" { + if "`detail'" != "" { noi display in yellow "Stata `myver' detected. Using {stata help geoplot:geoplot} package." } @@ -94,7 +94,7 @@ program bimap, sortpreserve if "`old'" != "" local oldtxt (but option old specified) - if "`details'" != "" { + if "`detail'" != "" { noi display in yellow "Stata `myver' detected `oldtxt'. Using {stata help spmap:spmap} package." } diff --git a/installation/bimap.sthlp b/installation/bimap.sthlp index fd3d307..47215db 100644 --- a/installation/bimap.sthlp +++ b/installation/bimap.sthlp @@ -33,7 +33,7 @@ using the {cmd:geopost()} options. For {cmd:spmap}, the old syntax just passes o {cmd:palette}({it:name}) {cmd:reverse} {cmd:clr0}({it:str}) {cmd:clrx}({it:str}) {cmd:clry}({it:str}) {cmdab:clrsat:urate}({it:num}) {cmd:cut}({it:pctile}|{it:equal}) {cmd:cutx}({it:numlist}) {cmd:cuty}({it:numlist}) {cmd:binsproper} {cmd:bins}({it:num >=2}) {cmd:binx}({it:num >=2}) {cmd:biny}({it:num >=2}) {cmd:values} {cmd:count} {cmd:percent} {cmdab:showleg:end} {cmd:ocolor}({it:str}) {cmd:osize}({it:str}) {cmd:ndocolor}({it:str}) {cmd:ndfcolor}({it:str}) {cmd:ndfsize}({it:str}) {cmdab:xdisc:rete} {cmdab:ydisc:rete} - {cmd:labxgap}({it:num}) {cmd:labygap}({it:num}) {cmd:textx}({it:str}) {cmd:texty}({it:str}) {cmd:formatx}({it:str}) {cmd:formaty}({it:str}) + {cmd:labxgap}({it:num}) {cmd:labygap}({it:num}) {cmd:textx}({it:str}) {cmd:texty}({it:str}) {cmd:formatx}({it:str}) {cmd:formaty}({it:str}) {cmd:detail} {cmdab:texts:ize}({it:str}) {cmdab:textlabs:ize}({it:str}) {cmdab:vallabs:ize}({it:str}) {cmdab:textc:olor}({it:str}) {cmdab:textlabc:olor}({it:str}) {cmdab:vallabc:olor}({it:str}) {cmd:xscale}({it:num}) {cmd:yscale}({it:num}) * {cmd:]} @@ -47,7 +47,7 @@ using the {cmd:geopost()} options. For {cmd:spmap}, the old syntax just passes o {cmd:palette}({it:name}) {cmd:reverse} {cmd:clr0}({it:str}) {cmd:clrx}({it:str}) {cmd:clry}({it:str}) {cmdab:clrsat:urate}({it:num}) {cmd:cut}({it:pctile}|{it:equal}) {cmd:cutx}({it:numlist}) {cmd:cuty}({it:numlist}) {cmd:binsproper} {cmd:bins}({it:num >=2}) {cmd:binx}({it:num >=2}) {cmd:biny}({it:num >=2}) {cmd:values} {cmd:count} {cmd:percent} {cmdab:showleg:end} {cmd:ocolor}({it:str}) {cmd:osize}({it:str}) {cmd:ndocolor}({it:str}) {cmd:ndfcolor}({it:str}) {cmd:ndfsize}({it:str}) {cmdab:xdisc:rete} {cmdab:ydisc:rete} - {cmd:labxgap}({it:num}) {cmd:labygap}({it:num}) {cmd:textx}({it:str}) {cmd:texty}({it:str}) {cmd:formatx}({it:str}) {cmd:formaty}({it:str}) + {cmd:labxgap}({it:num}) {cmd:labygap}({it:num}) {cmd:textx}({it:str}) {cmd:texty}({it:str}) {cmd:formatx}({it:str}) {cmd:formaty}({it:str}) {cmd:detail} {cmdab:texts:ize}({it:str}) {cmdab:textlabs:ize}({it:str}) {cmdab:vallabs:ize}({it:str}) {cmdab:textc:olor}({it:str}) {cmdab:textlabc:olor}({it:str}) {cmdab:vallabc:olor}({it:str}) {cmd:xscale}({it:num}) {cmd:yscale}({it:num}) * {cmd:]} @@ -66,7 +66,7 @@ The options are described as follows: {p2coldent : {opt bimap} {it:vary varx, options}}The command requires numeric {it:vary} and {it:varx} variables. See options below for additional info.{p_end} {p 4 4 2} -{it:{ul:Version 17 or newer options}} +{it:{ul:Version 17 or newer}} {p2coldent : {opt frame(name)}}The geoplot frames need to be defined before executing the bimap command. The {opt frame()} therefore ask users to define the frame name with the plot data. This is to ensure that the command still executes regardless of which frame is active.{p_end} @@ -80,7 +80,7 @@ This for example, can include zooms, legend options, arrows, scalebars etc.{p_en {p 4 4 2} -{it:{ul:Version 16 or older options}} +{it:{ul:Version 16 or older}} {p2coldent : {opt old}}If this option is specified, the command switches to the {cmd spmap} options below regardless of the Stata version. This is to ensure consistency and backward compatibility when using running dofiles that are setup for older command versions.{p_end} @@ -147,6 +147,8 @@ also be defined using {opt binx()} and/or {opt biny()}. The default is {opt bin( {p2coldent : {opt showleg:end}}If this option is specified, then the {stata help geoplot:geoplot} and {stata help spmap:spmap} options are enabled. Both commands have fairly complex syntaxes for generating legends so please see individual helpfiles for details.{p_end} +{p2coldent : {opt detail}}Show which Stata version is detected and which program is called.{p_end} + {p2coldent : {opt *}}All other standard twoway options.{p_end} @@ -254,6 +256,10 @@ ADD GEOPLOT AND MOREMATA {p 4 8 2}Pisati, B. (2018). {stata help spmap:spmap} v1.3.2. +{p 4 8 2}Jann, B. (2024). {browse "https://github.com/benjann/geoplot":geoplot}. + +{p 4 8 2}Jann, B. (2024). {browse "https://github.com/benjann/moremata":moremata}. + {p 4 8 2}Jann, B. (2018). {browse "https://www.stata-journal.com/article.html?article=gr0075":Color palettes for Stata graphics}. The Stata Journal 18(4): 765-785. {p 4 8 2}Jann, B. (2022). {browse "https://ideas.repec.org/p/bss/wpaper/43.html":Color palettes for Stata graphics: An update}. University of Bern Social Sciences Working Papers No. 43.