A few requirements:
Draw a scatter plot with x-axis is Cases, y-axis is Deaths.
Draw x-axis, y-axis, and ticks on the plot
Draw all dots in ‘circle’ use color to represent data by
date
Issues:
Well my points are on the chart but it looks awful. I need help changing the size of the chart.
x and y axis seem to be correct. IDK what “ticks” on the plot is referring to.
How can I draw dots in “‘circle’ use color to represent data by
date”
Hello and welcome to the platform! Have you seen the Plot Cheatsheets? They provide some good interactive examples of how to use Plot. You should be able to find some of your answers there. Take a look and let us know if you have any questions.
There are a few issues going on here. To address your specific questions first:
You can adjust the color using the fill channel, as you attempted. The problem with fill: Date is that Date doesn’t refer to the data, rather it’s a built in constructor. Thus, it’s the same for each data point, which is why you get the same color. To change the color, you want fill: "Date".
I’m not sure what you mean by your Ticks question, as you don’t refer to ticks at any point in your code.
You can change the size of the chart using the width and height channels, e.g.:
Plot.plot({
width: width, // The built in width macro
height: 500,
...
})
I’m not so sure that the plot looks awful; that kinda depends on what you want to illustrate. You might reduce the size of your points and/or add a little opacity. If you want to illustrate how deaths and cases are related, though, then I think a scatter plot like this is perfectly appropriate.
If you want to focus on something else, then you might need another time of plot. I don’t think that coloring by date is likely to be revealing, since you’ve got 4 colors assigned to over 13,000 different points that are all mixed together. You might try faceting like so:
That notebook also include the option to zoom in on the plots