@qe-libs/qeviz 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,16 +107,25 @@ qe_export_html(p, "output.html")
|
|
|
107
107
|
|
|
108
108
|
## Chain API
|
|
109
109
|
|
|
110
|
-
All three languages share the same chain operations
|
|
110
|
+
All three languages share the same chain operations, with the same argument
|
|
111
|
+
names; a plot built in any of them produces the same `<qe-graph>` markup and
|
|
112
|
+
model data (checked by the shared fixtures in `tests/golden/`):
|
|
111
113
|
|
|
112
114
|
| Operation | R | Python | Julia |
|
|
113
115
|
|---|---|---|---|
|
|
114
|
-
| Create | `qe_plot(set)` | `qeviz.plot(model)` | `qe_plot(model)` |
|
|
116
|
+
| Create | `qe_plot(set, title=, range=, scale_points=, point_scale=, center=, palette=)` | `qeviz.plot(model, title=, range=, ...)` | `qe_plot(model; title=, range=, ...)` |
|
|
115
117
|
| Group means | `qe_group(p, ...)` | `p.group(...)` | `qe_group(p, ...)` |
|
|
118
|
+
| Mean of a subset | `qe_group(p, points=, label=, color=, shape=, intervals=, outlier=)` | `p.group(points=, ...)` | `qe_group(p; points=, ...)` |
|
|
116
119
|
| Edge network | `qe_edges(p, group=, unit=, compare=, also=)` | `p.edges(group=, unit=, ...)` | `qe_edges(p; group=, unit=, ...)` |
|
|
120
|
+
| Network from data | `qe_edges(p, weights=, compare=, colors=, threshold=, name=)` | `p.edges(weights=, ...)` | `qe_edges(p; weights=, ...)` |
|
|
117
121
|
| Unit points | `qe_points(p)` | `p.points()` | `qe_points(p)` |
|
|
122
|
+
| Point set | `qe_points(p, units=/points=, color=, shape=, labels=, name=)` | `p.points(units=/points=, ...)` | `qe_points(p; units=/points=, ...)` |
|
|
123
|
+
| Nodes | `qe_nodes(p, show, unconnected=, positions=, labels=)` | `p.nodes(show, positions=, labels=)` | `qe_nodes(p; show=, positions=, labels=)` |
|
|
118
124
|
| Axes | `qe_axes(p, x=, y=)` | `p.axes(x=, y=)` | `qe_axes(p; x=, y=)` |
|
|
119
|
-
| Labels | `qe_labels(p, nodes=, means=, points=)` | `p.labels(...)` | `qe_labels(p; ...)` |
|
|
125
|
+
| Labels | `qe_labels(p, nodes=, means=, points=, font_size=, font_family=, font_color=)` | `p.labels(...)` | `qe_labels(p; ...)` |
|
|
126
|
+
| Group colours | `qe_colors(p, A = "#hex")` | `p.colors(A="#hex")` | `qe_colors(p, "A" => "#hex")` |
|
|
127
|
+
| Axis range | `qe_range(p, range)` | `p.range(range)` | `qe_range(p, range)` |
|
|
128
|
+
| Default palette | `qe_palette()` | `qeviz.palette()` | `qe_palette()` |
|
|
120
129
|
| Export | `qe_export_html(p, path)` | `p.export_html(path)` | `qe_export_html(p, path)` |
|
|
121
130
|
| Introspect | `qe_groups(p)` / `qe_units(p)` | `p.groups()` / `p.units()` | `qe_groups(p)` / `qe_units(p)` |
|
|
122
131
|
|
|
@@ -128,6 +137,10 @@ All three languages share the same chain operations:
|
|
|
128
137
|
| `unit` | Unit ID for an **individual** network (e.g. `"FirstGame::alice"`). Mutually exclusive with `group`. |
|
|
129
138
|
| `compare` | Second group to subtract (`group − compare`). Positive differences use the primary colour. |
|
|
130
139
|
| `also` | Second group to overlay alongside `group`. |
|
|
140
|
+
| `weights` | A network from data instead of a name: a named vector / Series / Dict of edge weights, an unnamed vector in the model's edge-column order, or a matrix / data frame (averaged over rows). Each call adds a layer. |
|
|
141
|
+
| `colors` | One or two colours (positive, negative); with one, negative weights use its complement. |
|
|
142
|
+
| `threshold` | `min` or `c(min, max)`: \|weight\| < min is not drawn, \|weight\| > max is drawn at max (sign kept). |
|
|
143
|
+
| `name` | Name of the network (reported in edge events); a later call with the same name replaces it. |
|
|
131
144
|
| `show` / `show=false` | Suppress all edges. |
|
|
132
145
|
| `color_scale` | Colour mapping (webENA ramps: saturation 0.25–1, opacity 0.3–1). `"model"` (default) rescales across the whole model, so plots of one model share a colour scale; `"plot"` rescales within the plot (webENA); `"absolute"` uses saturation = opacity = weight. |
|
|
133
146
|
| `edge_width` | Width of a weight-1 edge as a fraction of the plot width (default 0.04). Width is absolute — equal weights draw equally wide — and each node's diameter is the sum of its edges' widths. |
|
|
@@ -210,8 +223,9 @@ centre. The default is the origin, the ENA convention.
|
|
|
210
223
|
<qe-graph scale-points="false" center="content"></qe-graph>
|
|
211
224
|
```
|
|
212
225
|
|
|
213
|
-
In R these are `qe_plot(scale_points =, point_scale =, center =)`;
|
|
214
|
-
|
|
226
|
+
In R these are `qe_plot(scale_points =, point_scale =, center =)`; in Python
|
|
227
|
+
`qeviz.plot(..., scale_points=, point_scale=, center=)` and in Julia
|
|
228
|
+
`qe_plot(model; scale_points=, point_scale=, center=)`.
|
|
215
229
|
|
|
216
230
|
Child element presence controls layer visibility — add `<qe-points>` to show unit dots, omit it to hide them. A `MutationObserver` watches for child additions, removals, and attribute changes, so interactive controls can manipulate the DOM directly:
|
|
217
231
|
|