Skip to content

Instantly share code, notes, and snippets.

@adamjanes
Created March 17, 2018 08:28
Show Gist options
  • Save adamjanes/4fd2027fce22d7cd0c0df0face9bba2c to your computer and use it in GitHub Desktop.
Save adamjanes/4fd2027fce22d7cd0c0df0face9bba2c to your computer and use it in GitHub Desktop.
// Axes
var xAxisCall = d3.axisBottom(x)
var xAxis = g.append("g")
.attr("class", "x-axis")
.attr("transform", "translate(" + 0 + "," + height + ")")
.call(xAxisCall);
var yAxisCall = d3.axisLeft(y)
var yAxis = g.append("g")
.attr("class", "y-axis")
.call(yAxisCall)
// Labels
xAxis.append("text")
.attr("class", "axis-title")
.attr("transform", "translate(" + width + ", 0)")
.attr("y", -6)
.text("Grade Point Average")
yAxis.append("text")
.attr("class", "axis-title")
.attr("transform", "rotate(-90)")
.attr("y", 16)
.text("Height / Centimeters");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment