Scott Merryman <[email protected]> provided a nice US map dataset for
Maurizio Pisati's -tmap- program (thanks Scott). Scott also noted that he
could not draw a full map of all 50 states, but instead got an unhelpful
"syntax error"
> [...]
> I have encountered some problems getting -tmap- is display all 48
> states. When I try to map all 48 states I receive an "invalid
> syntax" error. However, if I restrict the number of regions it
> works. For example:
>
> . use "D:\data\maps\rma_summary.dta", clear
> (Summary of Business 2004 - From Public RMA website)
>
> . tmap chor lossratio , id(id) map("D:\data\maps\usmap.dta") palette(Blues) ocolor(white) osize(medium)
> invalid syntax
> r(902);
> [...]
Discovering what was happening here was a bit challenging, but the real
problem was actually quite simple and so is the solution. With so many
separate regions to draw Stata was simply running out of memory and the
solution is to set the memory size larger -- -set mem 20m- worked fine for me.
The reason neither Scott nor I could immediately diagnose this is that the
-tmap- program placed a -capture- in front of the -graph- command and
"captured" the standard error message -graph- tried to report; a message that
would have suggested the solution. I suspect that Maurizio put that capture
into -tmap- because prior to the update on 24nov2004 -graph- issued warning
notes when more than 15 plots were drawn and these notes probably annoyed
Maurizio. -graph- no longer issues such notes because it now recycles the
styles when more than 15 plots are drawn. I would suggest that Maurizio
replace
capture graph ...
with
capture noisily graph ...
so that -graph- users will see more informative error messages.
-- Vince
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/