GR.rb
:bar_chart: GR framework - the graphics library for visualization - for Ruby
Installation
GR.rb supports Ruby 2.4+.
Set environment variable GRDIR, if you have not already done.
export GRDIR="/your/path/to/gr"
Add this line to your application's Gemfile:
gem 'ruby-gr'
GR3 and GR::Plot require numo-narray.
Quick Start
require 'gr/plot'
x = [0, 0.2, 0.4, 0.6, 0.8, 1.0]
y = [0.3, 0.5, 0.4, 0.2, 0.6, 0.7]
GR.plot(x, y)
Examples
Have a look in the examples directory.
Features
GR::Plot
A simple, matlab-style API.
require 'gr/plot'
plot step scatter stem histogram contour contourf hexbin heatmap wireframe surface plot3 scatter3 imshow isosurface polar polarhist polarheatmap trisurf tricont shade volume
GR
require 'gr'
GR3
require 'gr3'
Documentation
GR Installation
Official binary release
Download the latest release.
Set environment variable GRDIR.
export GRDIR="your/path/to/gr"
- macOS Catalina and macOS Mojave: See the "How to open an app that hasn’t been notarized or is from an unidentified developer" section of Safely open apps on your Mac in the Apple documentation.
Homebrew
brew install libgr
Set environment variable GRDIR.
export GRDIR=$(brew --prefix libgr)
If you fail to build libgr using homebrew, Please feel free to send us your feedback.
Red data tools repository
Red data tools provides packages related to our project including libgr-dev and libgr3-dev for advanced users.
Backend for Charty
GR.rb will be the default backend for Charty.
Contributing
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
- Create visualization library based on GR.rb
Acknowledgements
We would like to thank Josef Heinen, the creator of GR.jl, Florian Rhiem, the creator of python-gr, and GR developers.