[英]How to make scatter plot in google sheets using 2 columns as X and Y values and the 3rd columns to get color of that point?
I have 3 columns in a google spreadsheet我在谷歌电子表格中有 3 列
Runs Balls Result
24 24 W
50 20 W
10 5 L
12 10 L
5 2 L
Now I want a scatter plot to be made, such that Runs and Balls are the X and Y axes, and the color of the point is determined by the values in the column Result.现在我想要一个散点图 plot ,这样 Runs 和 Balls 是 X 和 Y 轴,点的颜色由 Result 列中的值确定。
How do I achieve this?我如何实现这一目标?
You could separate your second column (y-value, "Balls") into two separate columns, depending on if the Result is W or L. In other words, make a chart based on three columns instead of two.您可以将第二列(y 值,“球”)分成两个单独的列,具体取决于结果是 W 还是 L。换句话说,基于三列而不是两列制作图表。 This way, two different colors will be assigned automatically when the chart is generated.这样,在生成图表时会自动分配两个不同的 colors。 (Later, you can change these colors by double-clicking on the chart to get to Chart Editor -> Customize -> Series -> Format -> Color). (稍后,您可以通过双击图表来更改这些 colors 以进入图表编辑器 -> 自定义 -> 系列 -> 格式 -> 颜色)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.