2021年5月3日星期一

Line plot not displaying line properly

Plot not properly displaying the line plot. both arrays are of size 271. I just want the scatterplot to be a line rather than points. I am using matplotlib

plt.rcParams.update({'font.size': 24})    fig, ax = plt.subplots(figsize=(14, 9))    plt.rcParams.update({'font.size': 15})    plt.scatter(                 wds['array'][0:271,836,342].compute(),            y1,            c= '#181A1B',            ls='-', #marker='o', markersize = '4',   )      ax.grid(b ='True',which='major')      plt.xlim(0, 20)    plt.yscale('log')  ax.yaxis.set_major_formatter(ScalarFormatter())    ax.yaxis.labelpad = 10      plt.rcParams.update({'font.size': 22})  fig.tight_layout()  

enter image description here

plt.plot(                 wds['array'][0:271,836,342].compute(),            y1,            c= '#181A1B',            ls='-', #marker='o', markersize = '4',   )  

enter image description here

https://stackoverflow.com/questions/67377877/line-plot-not-displaying-line-properly May 04, 2021 at 10:03AM

没有评论:

发表评论