Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created November 7, 2019 14:23
Show Gist options
  • Save mdfarragher/db5e2c618edc4674bd8f10680dfc9d89 to your computer and use it in GitHub Desktop.
Save mdfarragher/db5e2c618edc4674bd8f10680dfc9d89 to your computer and use it in GitHub Desktop.
// plot median house value by latitude and longitude
var chart = Chart.Plot(
new Graph.Scattergl()
{
x = houses.Select(v => v.Longitude),
y = houses.Select(v => v.Latitude),
mode = "markers",
marker = new Graph.Marker()
{
color = houses.Select(v => v.MedianHouseValue),
colorscale = "Jet"
}
}
);
chart.WithXTitle("Longitude");
chart.WithYTitle("Latitude");
chart.WithTitle("Median house value by location");
chart.Width = 600;
chart.Height = 600;
display(chart);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment