Draw horizontal lines from x=0 to data points in matplotlib scatterplot (horizontal stem plot)
问题 Consider the follwing plot: produced by this function: def timeDiffPlot(dataA, dataB, saveto=None, leg=None): labels = list(dataA["graph"]) figure(figsize=screenMedium) ax = gca() ax.grid(True) xi = range(len(labels)) rtsA = dataA["running"] / 1000.0 # running time in seconds rtsB = dataB["running"] / 1000.0 # running time in seconds rtsDiff = rtsB - rtsA ax.scatter(rtsDiff, xi, color='r', marker='^') ax.scatter ax.set_yticks(range(len(labels))) ax.set_yticklabels(labels) ax.set_xscale('log')