Skip to content
kojix2 edited this page Jun 17, 2020 · 14 revisions

There are two layers to the GR.rb API.

GR::Plot - A simple, matlab-style API.

require 'gr/plot'
GR.plot(x, y)

List of vailable functions. See GR.rb Wiki for details.

plot step plot3 polar scatter scatter3 stem barplot histogram polarhistogram hexbin contour contourf tricont surface trisurf wireframe volume heatmap polarheatmap shade imshow isosurface

GR - A module for calling native GR functions.

require 'gr'

# For example
GR.setviewport(0.1, 0.9, 0.1, 0.9)
GR.setwindow(0.0, 20.0, 0.0, 20.0)

GR3 - A module for calling native GR3 functions.

require 'gr3'

# For example
GR3.cameralookat(-3, 2, -2, 0, 0, 0, 0, 0, -1)
  • GR.rb can be used in Jupyter Notebook.
Clone this wiki locally