Skip to content

Commit a07bc21

Browse files
committed
Add htitle example with docu
1 parent eb29a94 commit a07bc21

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

demo/examples.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
{ "name": "fill_N", "opt": "fill_7", "title": "draw histogram with fill color N - index or name like 'green' or hex like 00774422" },
4444
{ "name": "xaxis_N", "opt": "xaxis_ff00ff", "title": "draw histogram X axis with color N - index or name like 'green' or hex like ff00ff" },
4545
{ "name": "yaxis_N", "opt": "yaxis_00ff0055", "title": "draw histogram Y axis with color N - index or name like 'green' or hex like 00ff0055" },
46+
{ "name": "htitle", "opt": "htitle:Custom%20histogram%20title", "title": "Change histogram title" },
4647
{ "opt": "inspect", "asurl": true, "file": "hsimple.root", "item": "hpx;1", "title": "universal object inspector, can be used for any class" },
4748
{ "name": "docu", "file": "histpainter6.root", "layout": "vert32", "items": ["two_axis","draw_e1","draw_bar","draw_e34","draw_text"], "title":"several TH1 examples from THistPainter documentation" },
4849
{ "name": "twoscales", "url": "nobrowser&file=$$$tutorials_hist.root&item=[twoscales/[1],twoscales/[3]]&opt=[hist,yaxis_red;line_red;y+]", "title": "interactive second Y scale to draw axis for second histogram" },

docs/JSROOT.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -222,24 +222,28 @@ More examples of supported classes can be found on: <https://root.cern/js/latest
222222

223223
One can change some histograms colors using draw options:
224224

225-
- line_N: [line color](https://root.cern/js/latest/examples.htm#th1_line_n)
226-
- fill_N: [fill color](https://root.cern/js/latest/examples.htm#th1_fill_n)
227-
- xaxis_N: [X axis color](https://jsroot.gsi.de/dev/examples.htm#th1_xaxis_n)
228-
- yaxis_N: [Y axis color](https://jsroot.gsi.de/dev/examples.htm#th1_yaxis_n)
225+
- `line_N` [line color](https://root.cern/js/latest/examples.htm#th1_line_n)
226+
- `fill_N` [fill color](https://root.cern/js/latest/examples.htm#th1_fill_n)
227+
- `htitle:value` [histogram title](https://jsroot.gsi.de/dev/examples.htm#th1_htitle)
228+
- `xaxis_N` [X axis color](https://jsroot.gsi.de/dev/examples.htm#th1_xaxis_n)
229+
- `yaxis_N` [Y axis color](https://jsroot.gsi.de/dev/examples.htm#th1_yaxis_n)
229230

230231
One also can modify histogram axes attributes by following option:
231-
- ctx: center title of X axis
232-
- cty: center title of Y axis
233-
- ctz: center title of Z axis
234-
- otx: place X axis title in opposite to normal corner
235-
- oty: place Y axis title in opposite to normal corner
236-
- otz: place Z axis title in opposite to normal corner
237-
- noex: no exponent for X axis labels
238-
- noey: no exponent for Y axis labels
239-
- noez: no exponent for Z axis labels
240-
- mlx: more log labels on X axis
241-
- mly: more log labels on Y axis
242-
- mlz: more log labels on Y axis
232+
- `ctx` center title of X axis
233+
- `cty` center title of Y axis
234+
- `ctz` center title of Z axis
235+
- `otx` place X axis title in opposite to normal corner
236+
- `oty` place Y axis title in opposite to normal corner
237+
- `otz` place Z axis title in opposite to normal corner
238+
- `noex` no exponent for X axis labels
239+
- `noey` no exponent for Y axis labels
240+
- `noez` no exponent for Z axis labels
241+
- `mlx` more log labels on X axis
242+
- `mly` more log labels on Y axis
243+
- `mlz` more log labels on Y axis
244+
- `xtitle:value` set title for X axis
245+
- `ytitle:value` set title for Y axis
246+
- `ztitle:value` set title for Z axis
243247

244248
Here N can be existing ROOT color index or hex6/hex8 values like [line_ff00ff](https://jsroot.gsi.de/dev/?nobrowser&file=../files/hsimple.root&item=hpx;1&opt=line_ff00ff) or [fill_7733ff34](https://jsroot.gsi.de/dev/?nobrowser&file=../files/hsimple.root&item=hpx;1&opt=fill_7733ff34).
245249

0 commit comments

Comments
 (0)