Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: colouring options of serrbar

From   "Truus F. Hausman" <[email protected]>
To   [email protected]
Subject   st: colouring options of serrbar
Date   Wed, 28 Sep 2011 21:53:00 +0200


I am struggling with the colouring options of serrbar. I would like to
colour groups of markers and change the style of error bars.
Specifically, I have got three different estimates from 20 countries
(e.g. from three different years or three different estimators). The
countries form the x-axis, at each unit of the x-axis there are three
estimates. Now, I would like to colour those estimates that stem from
the same group (i.e. the same estimator or year). So far I am unable
to find a solution. I tried two different approaches:

a) conditions in mvopts
serrbar mvar svar xvar, mvopts(mcolor(black if group==1, blue if group==2

b) addplot()
serrbar mvar svar xvar if group==1, mvopts(mcolor(black))
addplot(serrbar mvar svar xvar if group==2, mvopts(mcolor(blue)))

Both do not work. The first does not change the colour of the markers,
the second is not allowed ("serrbar is not a twoway plot type"

Has anyone an idea how I can change the colour of the markers and
maybe also the style of the error bars? Or will I have to use a
different type of graph?

I hope I explained it clearly enough. Thanks for your help!

Best regards,
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index