Working on a personal project that draws two lines, each dashed (ls='--') for the first two x-axis markings, then it is a solid line...thinking about writing a tutorial since I've found no information on this. Anyhow, the trick I'm stumped at, is to figure how many points are used to make the line for the first two x-axis markings, so I can properly turn off the solid line up to that point. I'm using the Line.set_dashes() method to turn off the solid line, and I'm making an individual (non-connected) copy and setting the linestyle to dash. This causes the lines to be drawn on top of each other, and the solid to take precedence when ON. However, the Line.set_dashes() takes "points" as arguments. I figured out where, but as you see, the second line has different angles, thus length, so this point is further along the line. Maybe there's a better way to set the line to two styles?
Here is an example plot --> https://flic.kr/p/rin6Z5
r = getPostData(wall)
if len(newTimes) < LIMIT:
LIMIT = len(newTimes)
yLim = int(round(max(r['Likes'].max(), r['Shares'].max()) * 1.2))
xLim = LIMIT
L1A = plt.Line2D(range(LIMIT), r['Likes'], color='b', ls='--')
L1B = plt.Line2D(range(LIMIT), r['Likes'], label='Likes', color='b')
L2A = plt.Line2D(range(LIMIT), r['Shares'], color='r', ls='--')
L2B = plt.Line2D(range(LIMIT), r['Shares'], label='Shares', color='r')
LNull = plt.Line2D(range(LIMIT), r['Shares'], ls='--', label='Recent Data\n(Early collection)', color='k')
dashes = [1,84,7000,1]
dashesNull=[1,7000]
fig = plt.figure()
ax = fig.add_subplot(111, ylim=(0,yLim), xlim=(0,xLim))
ax.add_line(L1A)
ax.add_line(L1B)
ax.add_line(L2A)
ax.add_line(L2B)
ax.add_line(LNull)
ax.legend(bbox_to_anchor=(1.5,1))
L1B.set_dashes(dashes)
L2B.set_dashes(dashes)
LNull.set_dashes(dashesNull)


ax.plot? I think it would be much simpler to control the display by limiting the data you pass to each plot.