d3_point | R Documentation |
d3_point
creates a D3 scatter plot. It takes data either directly or passed to it from d3plot
function.
d3_point(data, ...)
data |
data in JSON format, created by d3plot() or from another source |
... |
additional, optional arguments |
radius |
(optional) Affects the size of the dots, numerical scale |
opacity |
(optional) Affects the opacity of the dot works best with larger radius, 0-1 scale |
stroke |
(optional) Adds an outline to the point works best with larger radius, specify css color |
strokeMatch |
(optional) Matches the outline of the point to the color of the point looks best when opacity >1, boolean |
Title |
(optional) Gives graph a title, string "" |
yTitle |
(optional) Gives y axis a title, string "" |
xTitle |
(optional) Gives x axis a title, string "" |
yGrid |
(optional) Gives graph gridlines from the y ticks, boolean |
xGrid |
(optional) Gives graph gridlines from the x ticks, boolean |
gridColor |
(optional) Affects the color of the gridlines, specify css color |
gridOpacity |
(optional) Affects the opacity of the gridlines, 0-1 scale |
browser |
(mandatory/optional) If code editor has viewer browser is optional if not browser opens visual in a browser window |
d3plot
## Not run: # OK d3_point(d3plot(x = mpg, y = cyl, color = cyl, id = rownames(mtcars), data = mtcars)) # Better d3plot(x = Sepal.Length, y = Petal.Length, color = Species, data = iris) %>% d3_point(radius = 5) # With more arguments d3_point(d3plot(x = mpg, y = cyl, color = cyl, id = rownames(mtcars), data = mtcars ),radius = 15,opacity = .25,stroke = "black",strokeMatch = 1,yTitle = "Im confused by effect vs affect", Title = "MTCars", xTitle = "MPG",gridColor = "#30c5FF",yGrid = T,xGrid = T, gridOpacity = 1, browser = T) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.