How to skip empty dates (weekends) in a financial Matplotlib Python graph?
问题 ax.plot_date((dates, dates), (highs, lows), '-') I'm currently using this command to plot financial highs and lows using Matplotlib. It works great, but how do I remove the blank spaces in the x-axis left by days without market data, such as weekends and holidays? I have lists of dates, highs, lows, closes and opens. I can't find any examples of creating a graph with an x-axis that show dates but doesn't enforce a constant scale. 回答1: I think you need to "artificially synthesize" the exact