asjadnaqvi / stata-bumpline

A Stata package for bump line charts
MIT License
2 stars 0 forks source link

Bumpline - controlling marker options separately #5

Open ericmelse opened 1 year ago

ericmelse commented 1 year ago

Dear Asjad,

Following your instruction I have improved my code, like: bumpline total_ghg year, by(country) xsize(2) ysize(1) lw(1.2) msym(S) ms(2.3) mc(white) mlwid(*2) name(mfclw1sq, replace) which results in: Bumplot_markers_lw_20230204 Personally, I would rather follow Stata's regular syntax with using mfc instead of mc, that is what most if not all users will expect.

Next I want to control marker fill color separately for each bump line (as I am used to do with twoway commands), like:

local fc "white white white white white gs10 gs10 gs10 gs10 gs10"
bumpline total_ghg year, by(country) xsize(2) ysize(1) lw(1.2) msym(S) ms(2.3) mc(`fc') mlwid(*2) name(mfclw1sq, replace)

but, bumpline disagrees with me completely: Bumplot_markers_fillInd_20230204 complaining in the process of creation:

(note:  named style white white white gs10 gs10 gs10 gs10 gs10 gs10 gs10 not found in class color, default attributes used)
(note:  named style white white white gs10 gs10 gs10 gs10 gs10 gs10 gs10 not found in class color, default attributes used)
etc.

Ofcourse, I can agree with your design that marker fill colors are set to be identical to the color of the bumpline as such. However, from an analytical perspective the need to control them individually is desirable as to distinguish between groups (and not just apply a standard coding scheme).

mkaulisch commented 1 year ago

Not sure if it is a separate issue but I would like to highlight one line (e.g. my own institution). In twoway line I increase the linewidth of this particular line. Would be cool if it could be done with bumpline as well. Maybe by using a higher color intensity or opacity...