When I used plt.scatter in the program to draw a scatter plot[figure a], I found that it turned out to be a bar chart. When I ran plt.scatter in the Python console again, it was displayed correctly. The Python interpreter I used was the one that came with ArcGIS Pro.Fig.a
I used plt.scatter() to draw a scatter plot of two lists in my program (Figure 1), where config[“early_days”]=40, JS_list is a list of 40 data, but the plotted graph is a bar graph (Figure 2). Strangely, when I ran this command again by itself (plt.scatter(range(1, config[“early_days”]+1), JS_list, marker=’+’, c=’r’)), the scatter plot can be displayed normally (Figure 3)Fig.1Fig.2Fig.3. Does anyone know what could be causing this? By the way, my Python kernel is using the interpreter from ArcGIS Pro.
宋宇飞 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.