| CRdraw_lines | R Documentation | 
Draws multiple lines defined in line_list to rendering target. Line_list contains vector elements x1, y1, x2, y2, with each set (x1[i], y1[i], x2[i], y2[i]) defining one line. Consecutive lines are connected at the ends, i.e. a line is drawn from (x2[i], y2[i]) to (x1[i+1], y1[i+1]).
CRdraw_lines(graphics_list, line_list, status = NULL)
| graphics_list | List containing pointers to window, renderer etc. created with  | 
| line_list | List defining multiple lines, containing vector elements x1, y1, x2 and y2, with each set of x1[i], x2[i], y1[i] and y2[i] defining a line. | 
| status | Optional list  | 
    CRset_render_color(gs, list(r = 0, g = 0, b = 0))
    
    CRrender_clear(gs)
    
    CRset_render_color(gs, list(r = 100, g = 0, b = 0))
    
    lines <- list(x1 = c(50, 50, 50, 100),
                  y1 = c(50, 100, 100, 50),
                  x2 = c(100, 50, 100, 50),
                  y2 = c(100, 100, 50, 50))
    
    CRdraw_lines(gs, lines)
    
    CRrender_present(gs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.