Q: Error when I include a dash in the ylabel() option of twoway scatter version 15.1
clear

set obs 10
gen n = _n
gen x = n*10

* This works
twoway scatter n x, ylabel(1"1989" 2"1973-78")

* This doesn't work
twoway scatter n x, ylabel(1"1989-95" 2"1973-78")

The second plot results in the error 95"" invalid name. Why is this occurring?
The error has something to do with the - character, but it is exactly the same character that is used for 2"1973-78" in the first plot, which works (I have copy-pasted it).
I am running Stata 15.1 SE on Windows 10.

A: I confirm your problem in Stata 16.1, which is the latest as I write.
This does work:
twoway scatter n x, ylabel(1 "1989-95" 2 "1973-78")

All the relevant examples at https://www.stata.com/help.cgi?axis_label_options include spaces between numbers and the text strings to display.
I don't recollect an explicit rule to that effect, and it's your experience so far that you can get away by omitting the spaces, but evidently that doesn't always work.
Calling this a parsing issue is just giving the problem a name. I don't have a low-level explanation of why one worked and the other didn't.
