portbitcoin.blogg.se

Xy scatter plot line not straight
Xy scatter plot line not straight





xy scatter plot line not straight

Is there a way I can get y=x to show up even if I don't have a list of all the points that I plotted? I would think that something in matplotlib can give me a list of all the points after the fact, but I haven't been able to figure out how to get that list. In order to achieve this I've had to keep track of all the x and y values that went into the scatter plot so that I know where identity_line should start and end.

xy scatter plot line not straight

Plt.plot(identity_line, identity_line, color="black", linestyle="dashed", linewidth=3.0) However, the way each of these chart types plots data along the horizontal axis (also known as the x-axis) and the vertical axis (also known as the y-axis) is very different. Identity_line = np.linspace(max(min(all_x), min(all_y)), Scatter charts and line charts look very similar, especially when a scatter chart is displayed with connecting lines. # Could I somehow do the next part (add identity_line) if I haven't been keeping track of all the x and y values I've seen?

xy scatter plot line not straight

The image above demonstrates a custom chart line that fits the first and last column only. Here's some code that does scatter plot of a number of different series using matplotlib and then adds the line y=x: import numpy as np, matplotlib.pyplot as plt, matplotlib.cm as cm, pylabĬolors = cm.rainbow(np.linspace(0, 1, nseries)) Create a straight line through the first and last chart column. It is possible that whatever method you used to create your original chart specifically set the line property to be 'No line' for each of the series in your chart and that these settings remained in effect despite you changing the chart type to 'scatter with straight lines and markers'.







Xy scatter plot line not straight