-
Notifications
You must be signed in to change notification settings - Fork 7
API Overview
kojix2 edited this page Jun 17, 2020
·
14 revisions
There are two different approaches to plotting with GR.rb. One way is to call Matlab-like APIs. The other is to call GR/GR3 native functions. We are planning to prepare a more object-oriented interface based on GRUtils.jl in the future.
require 'gr/plot'
GR.plot(x, y)
List of vailable functions.
plot
step
plot3
polar
scatter
scatter3
stem
barplot
histogram
polarhistogram
hexbin
contour
contourf
tricont
surface
trisurf
wireframe
volume
heatmap
polarheatmap
shade
imshow
isosurface
Note: When you do require 'gr/plot'
, Matlab-style methods are added to the GR module. And some native functions of GR modules will be overwritten by these methods.
require 'gr'
# For example
GR.setviewport(0.1, 0.9, 0.1, 0.9)
GR.setwindow(0.0, 20.0, 0.0, 20.0)
require 'gr3'
# For example
GR3.cameralookat(-3, 2, -2, 0, 0, 0, 0, 0, -1)
under development.
User's Guide
Simple, matlab-style API
- Plotting functions
- Plot attributes
- Multiple plots
- Multiple subplots
- Save Plot to a file
- Jupyter Notebook
GR Native functions
For developers