Skip to content

Commit b06bec7

Browse files
mickaphdclaude
andcommitted
Helix 1.0.3: in full color
Palettes from the literature, each graph its own; a style per series (color, shape, dashes, pattern); points picked and styled one by one; outlines, fills, lines and error bars; texts moved by hand; zoom; export at 150/300/600 DPI; a clearer Format panel; sturdier file reading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 11ac92e commit b06bec7

67 files changed

Lines changed: 6549 additions & 1627 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎FILE-FORMAT.md‎

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ Optional fields:
7575
| Field | Meaning |
7676
| --- | --- |
7777
| `excluded` | Cells excluded from analyses and graphs, as `"row,column"` (0-based, column 0 is Title): `["2,1"]` |
78-
| `seriesColors` | A color per column (or per group of a grouped table): `{"Control": "red"}` |
79-
| `pointColors` | A color per cell, as `"column name#row"`: `{"Control#3": "green"}` |
8078
| `widths` | Column widths set by the user, in pixels, by column name |
8179
| `freezeTitle` | `true` keeps the Title column visible while scrolling |
8280

83-
Colors are `"blue"`, `"red"`, `"green"`, `"purple"`, `"orange"` or `"black"`.
81+
Files from before Helix 1.0.3 may also have `seriesColors`, a color per column (or
82+
group), and `pointColors`, a color per cell as `"column name#row"`, each `"blue"`,
83+
`"red"`, `"green"`, `"purple"`, `"orange"` or `"black"`: Helix reads them as the
84+
colors of the table's graphs (see Graph).
8485

8586
### Analysis
8687

@@ -109,3 +110,60 @@ from the table when the file opens, so results always match the data.
109110

110111
`graphOptions` holds every display setting (see `GraphOptions` in
111112
`src/store/types.ts`). A missing setting takes its default.
113+
114+
A graph's colors and style are its own:
115+
116+
```json
117+
"palette": { "name": "okabe-ito", "kind": "categorical", "colors": ["#000000", "#E69F00", …] },
118+
"series": { "Control": { "color": "#0072B2", "shape": "square", "dash": "dash", "pattern": "diagonal" } },
119+
"points": { "Control#3": { "color": "#D55E00", "size": 11, "shape": "diamond", "outline": 2, "outlineColor": "#000000" } },
120+
"fill": 1, "pointFill": 1, "pointSize": 7, "pointShape": "circle", "pointOutline": 1.5,
121+
"outline": 1.5, "outlineColor": "#000000", "pointOutlineColor": "#FFFFFF", "barGap": 0.1,
122+
"lineWidth": 2, "lineDash": "solid", "errorWidth": 1.5, "errorCaps": 6, "errorColor": "#000000", "errorDirection": "above",
123+
"legend": { "x": 0.8, "y": 0.1 }, "note": { "x": 30, "y": 40 }, "xTitleGap": 12, "yTitleGap": 2
124+
```
125+
126+
- `palette`: which palette (`src/lib/palettes.ts`), and its colors, written out so
127+
the figure keeps them whatever Helix's list of palettes becomes. `kind` is
128+
`"categorical"` (colors taken in turn) or `"sequential"` / `"diverging"` (a
129+
gradient: series take evenly spaced colors along it, a heatmap all of it).
130+
`reversed: true`: its colors are written from the last (Reverse Colors).
131+
- `series`: the series styled by hand, by column or group name (a volcano's are
132+
`"down"` and `"up"`): `color`, `shape` of its points, `dash` of its line (`"solid"`,
133+
`"dash"`, `"dot"`, `"dashdot"`) and `pattern` over its bars, area or slice
134+
(`"diagonal"`, `"back-diagonal"`, `"crosshatch"`, `"horizontal"`, `"vertical"`,
135+
`"grid"`, `"dots"`); the others take the palette's color for their place and the
136+
graph's `pointShape` and `lineDash`.
137+
- `points`: the points styled one by one, as `"column name#row"` (row 0 is the first),
138+
each with any of `color`, `size`, `shape`, `fill` (how opaque, 0 to 1), `outline`, `outlineColor` (a color, or
139+
`"fill"`: the point's own color), `label` (`true`: it shows its row's title, or its
140+
row number, beside it) and `labelOffset` (where that name was moved, in pixels from
141+
the point, `y` downward); the rest comes from its series and
142+
the graph. A volcano's genes are their rows alone, `"#row"`; a gene's own style wins
143+
over its up / down / not significant look. They follow the table: a renamed column,
144+
inserted or deleted rows.
145+
- `fill`: how opaque bars, boxes, violins and areas are, from 0 to 1; `pointFill`,
146+
points.
147+
- `pointSize` and `pointOutline` (in pixels) and `pointShape` (`"circle"`, `"square"`,
148+
`"diamond"`, `"triangle-up"`, `"triangle-down"`): every point of the graph.
149+
- `outline` (in pixels) and `outlineColor`: the outline of bars, boxes, violins, areas
150+
and pie slices; `pointOutlineColor`, of points. Without a color, an outline takes the
151+
color of what it outlines.
152+
- `barGap`: on interleaved grouped bars and XY bars, the gap between the bars of a row
153+
(or of an X), as a fraction of it (0: side by side).
154+
- `lineWidth`, `lineDash`: every series line's thickness (in pixels) and dashes.
155+
- `errorWidth`, `errorCaps` (in pixels), `errorColor` (none: each series' color) and
156+
`errorDirection` (`"both"` or `"above"`: up, or right on horizontal bars): error bars,
157+
and the mean or median line drawn with them.
158+
- `legend` and `note`: texts moved by hand. The legend (or a heatmap's color legend),
159+
as a fraction of the plot area from its bottom-left corner; the note (a fit's
160+
equation), in pixels from the plot's top-left corner, `y` downward. Without them,
161+
each sits in its usual place.
162+
- `xTitleGap`, `yTitleGap`: the space in pixels between each axis title and its tick
163+
labels.
164+
165+
A graph without `palette` comes from Helix 1.0.2 or before: it takes the Helix
166+
palette, its table's `seriesColors`, its old `heatmapColorScale` or
167+
`volcanoColorUp` / `volcanoColorDown` / `volcanoPointSize`, fills at 0.5 (a pie's at 1,
168+
a volcano's points at 0.75), its type's point size and outline, and bars side by side (`barGap` 0),
169+
so it looks as it did.

‎README.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ which update as soon as the data change.
3434
- Five table types: **Column**, **XY**, **Grouped**, **Multiple Variables** and **Contingency**
3535
- A spreadsheet that feels like one: copy and paste with Excel or Numbers, fill down, find,
3636
undo and redo everything
37-
- Exclude a value from the analyses without deleting it; color a whole series or a single point
37+
- Exclude a value from the analyses without deleting it
3838

3939
### Analyses
4040

@@ -57,8 +57,11 @@ for you. Every result comes from R.
5757
scatter plots, dose-response curves, Kaplan-Meier survival curves, heatmaps, pie charts, and
5858
volcano plots that handle tens of thousands of genes
5959
- Significance stars and regression lines drawn straight from your analyses
60-
- Figures ready for a paper: resize by dragging an axis, set exact sizes, pick colors, white or
61-
transparent background; export as PNG (300 dpi), SVG or JPG, or copy and paste anywhere
60+
- Colors from scientific palettes (Okabe-Ito, Paul Tol, Viridis…); style each series, or each
61+
point you click: color, shape, size, outline, dashed lines, fill patterns
62+
- Figures ready for a paper: resize by dragging an axis, set exact sizes, move the legend and
63+
labels, white or transparent background; export as PNG or JPG (150, 300 or 600 dpi) or SVG,
64+
or copy and paste anywhere
6265

6366
### Projects
6467

@@ -99,8 +102,8 @@ Helix is free software: you can redistribute it and modify it under the terms of
99102

100103
Helix stands on the shoulders of [R](https://www.r-project.org) and
101104
[webR](https://github.com/r-wasm/webr), which bring R to the app,
102-
[Plotly.js](https://plotly.com/javascript/) for the graphs, and [Tauri](https://tauri.app)
103-
and [React](https://react.dev) for the app itself. See
105+
[Plotly.js](https://plotly.com/javascript/) for the graphs, [Phosphor Icons](https://phosphoricons.com)
106+
for its icons, and [Tauri](https://tauri.app) and [React](https://react.dev) for the app itself. See
104107
[THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md) for all of them and their licenses.
105108

106109
GraphPad Prism is a trademark of GraphPad Software, LLC. Helix is an independent project,

‎THIRD-PARTY-NOTICES.md‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ license; the full texts come with each package's source.
1010
| --- | --- | --- | --- |
1111
| [R](https://www.r-project.org) | 4.5.1 | GPL-2 or GPL-3 | Every statistical test |
1212
| [webR](https://github.com/r-wasm/webr) | 0.5.9 | Binaries: GPL-3; JavaScript: MIT | Runs R inside the app (R compiled to WebAssembly) |
13-
| [Plotly.js](https://github.com/plotly/plotly.js) | 3.7.0 | MIT | Drawing the graphs |
13+
| [Plotly.js](https://github.com/plotly/plotly.js) | 4.1.1 | MIT | Drawing the graphs |
1414
| [React](https://react.dev) and React DOM | 19.2.6 | MIT | The interface |
1515
| [Tauri](https://tauri.app) (with its dialog and window-state plugins) | 2.11 | MIT or Apache-2.0 | The native macOS app around the interface |
1616
| [objc2](https://github.com/madsmtm/objc2) | 0.6.4 | MIT | Talking to macOS from the native side |
1717
| [percent-encoding](https://github.com/servo/rust-url) | 2.3.2 | MIT or Apache-2.0 | Passing file paths to the native side |
1818
| [serde](https://serde.rs) | 1.0.229 | MIT or Apache-2.0 | Passing data between the windows and the native side |
19-
| [Lucide](https://lucide.dev) | 0.542.0 | ISC | Icons |
19+
| [Phosphor Icons](https://phosphoricons.com) | 2.1.10 | MIT | Icons |
2020
| [Tailwind CSS](https://tailwindcss.com) | 4.2.4 | MIT | Styles (compiled into the app's stylesheet) |
2121

2222
The webR binaries bundle further open-source software, each under its own license
@@ -26,6 +26,21 @@ The webR binaries bundle further open-source software, each under its own licens
2626
The Rust and JavaScript libraries these depend on are listed with their versions in
2727
`src-tauri/Cargo.lock` and `package-lock.json`; all are under open-source licenses.
2828

29+
## Color palettes
30+
31+
A graph's palettes (`src/lib/palettes.ts`) are the authors' colors, in their order:
32+
33+
| Palettes | Authors | Source | License |
34+
| --- | --- | --- | --- |
35+
| Okabe-Ito | Masataka Okabe and Kei Ito | [Color Universal Design](https://jfly.uni-koeln.de/color/) (2008) | Free to use |
36+
| Tol Bright, Tol Muted | Paul Tol, SRON | [Colour schemes](https://personal.sron.nl/~pault/) (2021) | BSD 3-Clause, © 2022 Paul Tol |
37+
| Tableau 10 | Tableau Software | [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) | ISC, © 2010-2024 Mike Bostock |
38+
| Viridis, Magma, Cividis | Stéfan van der Walt and Nathaniel Smith; Jamie Nuñez et al. (Cividis) | [Matplotlib](https://matplotlib.org) | CC0 (Viridis, Magma); Matplotlib license (Cividis) |
39+
| Batlow, Vik | Fabio Crameri | [Scientific colour maps 8.0.1](https://doi.org/10.5281/zenodo.1243862) | MIT, © Fabio Crameri |
40+
| Coolwarm, Fast | Kenneth Moreland | [Color advice](https://www.kennethmoreland.com/color-advice/) | CC0 |
41+
| vlag | Michael Waskom | [Seaborn](https://seaborn.pydata.org) | BSD 3-Clause, © 2012-2023 Michael L. Waskom |
42+
| RdBu | Cynthia Brewer, Mark Harrower, The Pennsylvania State University | [ColorBrewer](https://colorbrewer2.org) | Apache 2.0, © 2002 |
43+
2944
## Source code
3045

3146
Helix's source code is at <https://github.com/mickaphd/Helix>. The source code of R is at

‎package-lock.json‎

Lines changed: 21 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "helix",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Scientific data analysis, simplified — an open-source alternative to GraphPad Prism.",
55
"private": true,
66
"license": "GPL-3.0-or-later",
@@ -15,10 +15,10 @@
1515
"test": "node --import tsx tests/checks.ts && node --import tsx tests/reference.ts"
1616
},
1717
"dependencies": {
18+
"@phosphor-icons/react": "^2.1.10",
1819
"@tauri-apps/api": "^2.11.1",
1920
"@tauri-apps/plugin-dialog": "^2.7.3",
20-
"lucide-react": "^0.542.0",
21-
"plotly.js-dist-min": "^3.7.0",
21+
"plotly.js-dist-min": "^4.1.1",
2222
"react": "^19.1.1",
2323
"react-dom": "^19.1.1",
2424
"webr": "^0.5.4"

0 commit comments

Comments
 (0)