GithubHelp home page GithubHelp logo

arkraieski / c3plot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.29 MB

R Package for Interactive Plotting via C3.js with a Base Graphics-like Interface

Home Page: https://arkraieski.github.io/c3plot/

R 69.21% JavaScript 30.06% CSS 0.73%
data-visualization r graphics data-science

c3plot's Introduction

c3plot

GitHub Workflow Status

The goal of c3plot is provide to a base ‘graphics’-like interface to the C3.js JavaScript charting library. The main c3plot() function is an S3 generic like the base plot() function with methods for various base R objects.

Besides htmlwidgets, it has minimal R dependencies. Tidyverse not required!

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("arkraieski/c3plot")

Example

Here’s some example code for a basic scatter plot using R’s airquality dataset:

library(c3plot)
air <- airquality
c3plot(air$Ozone, air$Solar.R, 
       main = "New York Air Quality Measurements", 
       xlab = "Ozone (ppb)",
       ylab = "Solar Radiation (lang)",
       col = "red")

Methods

To see a list of S3 methods:

library(c3plot)
methods(c3plot)
#> [1] c3plot.default*  c3plot.density*  c3plot.factor*   c3plot.function*
#> [5] c3plot.lm*      
#> see '?methods' for accessing help and source code

More are on the way! The goal is to replicate the behavior of base R plot() methods as closely as possible while also getting the benefits of using C3 (ie. interactivity). Each method has its own help page that can be accessed for additional information.

Testing

The package is tested on Windows, Linux, and MacOS.

c3plot's People

Contributors

arkraieski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.