@@ -5,7 +5,26 @@ An advanced plotting library for Ruby.
5
5
6
6
It aims to allow you to visualize anything, anywhere with a flexible, extensible, Ruby-like API.
7
7
8
- # Usage
8
+ # Backends
9
+
10
+ Rubyplot can use different backends to render its plots:
11
+
12
+ - ` magick ` Using ImageMagick
13
+ - ` gr ` Using the GR framework
14
+ - ` tk_canvas ` Interactive drawing in a Canvas object using Ruby/Tk
15
+
16
+ Call ` Rubyplot.set_backend ` at the start of your program to select
17
+ the desired backend.
18
+
19
+ Pick the desired one:
20
+
21
+ ``` ruby
22
+ Rubyplot .set_backend(:magick )
23
+ Rubyplot .set_backend(:gr )
24
+ Rubyplot .set_backend(:tk_canvas )
25
+ ```
26
+
27
+ # Installing GR
9
28
10
29
Install the GR framework from the [ website] ( https://gr-framework.org/c.html ) .
11
30
@@ -17,6 +36,25 @@ export GKS_FONTPATH="/home/sameer/Downloads/gr"
17
36
export RUBYPLOT_BACKEND="GR"
18
37
```
19
38
39
+ # Installing Tk
40
+
41
+ In addition to install the ` tk ` gem in your project, you need to
42
+ install the Tcl/Tk runtime in your system. The instructions depending
43
+ on the OS but it is a safe bet to install the Community Edition of
44
+ Active Tcl from https://www.activestate.com/
45
+
46
+ You have more details about installing Tk in different systems in the
47
+ excelent [ TkDocs] ( https://tkdocs.com/tutorial/install.html ) website.
48
+
49
+ If you want to have a more modern way of interacting with Tk from
50
+ Ruby, you can use
51
+ [ TkComponent] ( https://github.com/josepegea/tk_component ) and
52
+ [ TkInspect] ( https://github.com/josepegea/tk_inspect ) .
53
+
54
+ # Examples
55
+
56
+ See the [ examples] ( ./examples ) to see some how-to code.
57
+
20
58
# Short term priorities
21
59
22
60
Check milestones in GitHub for more information.
0 commit comments