151 def plot(mag, width, centers, clusterId, marker="o", markersize=2, markeredgewidth=0, ltype='-',
163 axes = fig.add_axes((0.1, 0.1, 0.85, 0.80))
165 xmin = sorted(mag)[int(0.05*len(mag))]
166 xmax = sorted(mag)[int(0.95*len(mag))]
168 axes.set_xlim(-17.5, -13)
169 axes.set_xlim(xmin - 0.1*(xmax - xmin), xmax + 0.1*(xmax - xmin))
172 colors = [
"r",
"g",
"b",
"c",
"m",
"k", ]
173 for k, mean
in enumerate(centers):
175 axes.plot(axes.get_xlim(), (mean, mean,),
"k%s" % ltype)
177 ll = (clusterId == k)
178 axes.plot(mag[ll], width[ll], marker, markersize=markersize, markeredgewidth=markeredgewidth,
179 color=colors[k%len(colors)])
181 ll = (clusterId == -1)
182 axes.plot(mag[ll], width[ll], marker, markersize=markersize, markeredgewidth=markeredgewidth,
186 axes.set_xlabel(
"model")
187 axes.set_ylabel(
r"$\sqrt{I_{xx} + I_{yy}}$")