Skip to content

Commit 145fad5

Browse files
committed
doc: README completion
1 parent 9a4e4eb commit 145fad5

File tree

3 files changed

+106
-47
lines changed

3 files changed

+106
-47
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: ggiraph
33
Title: Make 'ggplot2' Graphics Interactive
4-
Version: 0.9.3.001
4+
Version: 0.9.3.002
55
Authors@R: c(
66
person("David", "Gohel", , "david.gohel@ardata.fr", role = c("aut", "cre")),
77
person("Panagiotis", "Skintzos", , "sigmapi@posteo.net", role = "aut"),

README.Rmd

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,54 @@ usually read them and answer when possible.
133133

134134
### Bug reports
135135

136-
When you file a [bug report](https://github.com/davidgohel/ggiraph/issues), please spend
137-
some time making it easy for me to follow and reproduce. The more time you spend on making
138-
the bug report coherent, the more time I can dedicate to investigate the bug as opposed to
139-
the bug report.
136+
When you file a [bug report](https://github.com/davidgohel/ggiraph/issues),
137+
please spend some time making it easy for me to follow and reproduce. The more
138+
time you spend on making the bug report coherent, the more time I can dedicate
139+
to investigate the bug as opposed to the bug report.
140140

141141
### Contributing to the package development
142142

143143
A great way to start is to contribute an example or improve the documentation.
144144

145-
If you want to submit a Pull Request to integrate functions of yours, provide if possible:
145+
If you want to submit a Pull Request to integrate functions of yours, provide if
146+
possible:
146147

147-
* the new function(s) with code and roxygen tags (with examples)
148-
* a new section in the appropriate vignette that describes how to use the new function
149-
* corresponding tests in directory `inst/tinytest`.
148+
- the new function(s) with code and roxygen tags (with examples)
149+
- a new section in the appropriate vignette that describes how to use the new
150+
function
151+
- corresponding tests in directory `inst/tinytest`.
150152

151-
By using rhub (run `rhub::check_for_cran()`), you will see if everything is ok.
152-
When submitted, the PR will be evaluated automatically with Github Action
153-
and you will be able to see if something broke.
153+
### Install from sources on macOS
154154

155+
Please read carefully the official R for macOS instructions: https://mac.r-project.org/
156+
157+
To compile `{ggiraph}` from source, you need `libpng`. Using Homebrew is recommended:
158+
159+
```
160+
brew install libpng
161+
```
162+
163+
Then configure your `~/.R/Makevars` file with the appropriate paths. For Apple
164+
Silicon Macs (M1/M2/M3), the typical configuration is:
165+
166+
```
167+
CFLAGS=-I/opt/homebrew/include
168+
CPPFLAGS=-I/opt/homebrew/include
169+
CXXFLAGS=-I/opt/homebrew/include
170+
CXX11FLAGS=-I/opt/homebrew/include
171+
LDFLAGS=-L/opt/homebrew/lib
172+
```
173+
174+
For Intel Macs, paths are usually `/usr/local/include` and `/usr/local/lib` instead.
175+
176+
```
177+
CFLAGS=-I/usr/local/include
178+
CPPFLAGS=-I/usr/local/include
179+
CXXFLAGS=-I/usr/local/include
180+
CXX11FLAGS=-I/usr/local/include
181+
LDFLAGS=-L/usr/local/lib
182+
```
183+
184+
185+
> Note: Paths may vary depending on your system configuration. We are unable to
186+
provide support for installation issues related to macOS compilation setup.

README.md

Lines changed: 62 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,26 @@ elements when used in shiny applications.
1818
Interactivity is added to ggplot **geometries, legends and theme
1919
elements**, via the following aesthetics:
2020

21-
- `tooltip`: tooltips to be displayed when mouse is over elements.
22-
- `onclick`: JavaScript function to be executed when elements are
23-
clicked.
24-
- `data_id`: id to be associated with elements (used for hover and
25-
click actions)
21+
- `tooltip`: tooltips to be displayed when mouse is over elements.
22+
- `onclick`: JavaScript function to be executed when elements are
23+
clicked.
24+
- `data_id`: id to be associated with elements (used for hover and click
25+
actions)
2626

2727
### Why use `{ggiraph}`
2828

29-
- You want to provide your readers with more information than the
30-
basic information available; you can display a tooltip when the
31-
user’s mouse is on a graphical element, you can also visually
32-
animate elements with the same attribute when the mouse passes over
33-
a graphical element, and finally you can link a JavaScript action to
34-
the click, such as opening a hypertext link.
35-
- You want to allow users of a Shiny application to select graphical
36-
elements; for example, you can make the points of a scatter plot
37-
selectable and available as a reactive value from the server part of
38-
your application. With Shiny, `{ggiraph}` allows interaction with
39-
graph elements, legends elements, titles and ggplot theme elements
40-
from the server part; each selection is available as a reactive
41-
value.
29+
- You want to provide your readers with more information than the basic
30+
information available; you can display a tooltip when the user’s mouse
31+
is on a graphical element, you can also visually animate elements with
32+
the same attribute when the mouse passes over a graphical element, and
33+
finally you can link a JavaScript action to the click, such as opening
34+
a hypertext link.
35+
- You want to allow users of a Shiny application to select graphical
36+
elements; for example, you can make the points of a scatter plot
37+
selectable and available as a reactive value from the server part of
38+
your application. With Shiny, `{ggiraph}` allows interaction with
39+
graph elements, legends elements, titles and ggplot theme elements
40+
from the server part; each selection is available as a reactive value.
4241

4342
![](man/figures/image_girafe.png)
4443

@@ -52,12 +51,12 @@ elements**, via the following aesthetics:
5251

5352
The things you need to know to create an interactive graphic :
5453

55-
- Instead of using `geom_point`, use `geom_point_interactive`, instead
56-
of using `geom_sf`, use `geom_sf_interactive`… Provide at least one
57-
of the aesthetics `tooltip`, `data_id` and `onclick` to create
58-
interactive elements.
59-
- Call function `girafe` with the ggplot object so that the graphic is
60-
translated as a web interactive graphics.
54+
- Instead of using `geom_point`, use `geom_point_interactive`, instead
55+
of using `geom_sf`, use `geom_sf_interactive`… Provide at least one of
56+
the aesthetics `tooltip`, `data_id` and `onclick` to create
57+
interactive elements.
58+
- Call function `girafe` with the ggplot object so that the graphic is
59+
translated as a web interactive graphics.
6160

6261
``` r
6362
library(ggplot2)
@@ -75,10 +74,10 @@ girafe(ggobj = gg_point)
7574

7675
### With Shiny
7776

78-
- If used within a shiny application, elements associated with an id
79-
(`data_id`) can be selected and manipulated on client and server
80-
sides. The list of selected values will be stored in in a reactive
81-
value named `[shiny_id]_selected`.
77+
- If used within a shiny application, elements associated with an id
78+
(`data_id`) can be selected and manipulated on client and server
79+
sides. The list of selected values will be stored in in a reactive
80+
value named `[shiny_id]_selected`.
8281

8382
![](man/figures/shiny_girafe.png)
8483

@@ -140,11 +139,39 @@ documentation.
140139
If you want to submit a Pull Request to integrate functions of yours,
141140
provide if possible:
142141

143-
- the new function(s) with code and roxygen tags (with examples)
144-
- a new section in the appropriate vignette that describes how to use
145-
the new function
146-
- corresponding tests in directory `inst/tinytest`.
142+
- the new function(s) with code and roxygen tags (with examples)
143+
- a new section in the appropriate vignette that describes how to use
144+
the new function
145+
- corresponding tests in directory `inst/tinytest`.
147146

148-
By using rhub (run `rhub::check_for_cran()`), you will see if everything
149-
is ok. When submitted, the PR will be evaluated automatically with
150-
Github Action and you will be able to see if something broke.
147+
### Install from sources on macOS
148+
149+
Please read carefully the official R for macOS instructions:
150+
<https://mac.r-project.org/>
151+
152+
To compile `{ggiraph}` from source, you need `libpng`. Using Homebrew is
153+
recommended:
154+
155+
brew install libpng
156+
157+
Then configure your `~/.R/Makevars` file with the appropriate paths. For
158+
Apple Silicon Macs (M1/M2/M3), the typical configuration is:
159+
160+
CFLAGS=-I/opt/homebrew/include
161+
CPPFLAGS=-I/opt/homebrew/include
162+
CXXFLAGS=-I/opt/homebrew/include
163+
CXX11FLAGS=-I/opt/homebrew/include
164+
LDFLAGS=-L/opt/homebrew/lib
165+
166+
For Intel Macs, paths are usually `/usr/local/include` and
167+
`/usr/local/lib` instead.
168+
169+
CFLAGS=-I/usr/local/include
170+
CPPFLAGS=-I/usr/local/include
171+
CXXFLAGS=-I/usr/local/include
172+
CXX11FLAGS=-I/usr/local/include
173+
LDFLAGS=-L/usr/local/lib
174+
175+
> Note: Paths may vary depending on your system configuration. We are
176+
> unable to provide support for installation issues related to macOS
177+
> compilation setup.

0 commit comments

Comments
 (0)