pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedImprovement of GIN figure
6+ messages / 4 participants
[nested] [flat]
* Improvement of GIN figure
@ 2019-07-07 13:18 Jürgen Purtz <juergen@purtz.de>
0 siblings, 1 reply; 6+ messages in thread
From: Jürgen Purtz @ 2019-07-07 13:18 UTC (permalink / raw)
To: Pg Docs <pgsql-docs@lists.postgresql.org>
To increase the consistency between the surrounding, explaining text and
the figure, there are some changes and additions to the texts within the
figure.
Also: Added a hint in README for ditaa developers.
Jürgen Purtz
Attachments:
gin.patch (text/x-patch, 3.0K) download
diff --git a/doc/src/sgml/images/README b/doc/src/sgml/images/README
index 07c4580255..c451d4bca4 100644
--- a/doc/src/sgml/images/README
+++ b/doc/src/sgml/images/README
@@ -13,7 +13,8 @@ involve diffable source files.
These tools are acceptable:
- Graphviz (https://graphviz.org/)
-- Ditaa (http://ditaa.sourceforge.net/)
+- Ditaa (https://github.com/stathissideris/ditaa), version 0.11 or
+ higher. Previous versions does not support SVG.
We use SVG as the format for integrating the image into the ultimate
output formats of the documentation, that is, HTML, PDF, and others.
diff --git a/doc/src/sgml/images/gin.gv b/doc/src/sgml/images/gin.gv
index 097e91029a..d0442abf15 100644
--- a/doc/src/sgml/images/gin.gv
+++ b/doc/src/sgml/images/gin.gv
@@ -27,9 +27,12 @@ digraph "gin" {
e4 -> e8;
e4 -> e9;
- e6 [fillcolor=green, label="posting list"];
- e8 [fillcolor=green, label="posting list"];
- e9 [fillcolor=green, label="posting list"];
+ e5 [fillcolor=green4, label="pointer to\nposting tree"];
+ e6 [fillcolor=green, label="posting list"];
+ e7 [fillcolor=green4, label="pointer to\nposting tree"];
+ e8 [fillcolor=green, label="posting list"];
+ e9 [fillcolor=green, label="posting list"];
+
}
subgraph cluster02 {
@@ -45,8 +48,8 @@ digraph "gin" {
p1 -> p2;
p1 -> p3;
- p2 [fillcolor=green, label="heap ptr"];
- p3 [fillcolor=green, label="heap ptr"];
+ p2 [fillcolor=green, label="posting list"];
+ p3 [fillcolor=green, label="posting list"];
}
subgraph cluster03 {
@@ -56,7 +59,7 @@ digraph "gin" {
p4;
}
- p4 [fillcolor=green, label="heap ptr"];
+ p4 [fillcolor=green, label="posting list"];
}
subgraph cluster04 {
@@ -72,14 +75,14 @@ digraph "gin" {
p5 -> p6;
p5 -> p7;
- p6 [fillcolor=green, label="heap ptr"];
- p7 [fillcolor=green, label="heap ptr"];
+ p6 [fillcolor=green, label="posting list"];
+ p7 [fillcolor=green, label="posting list"];
}
subgraph cluster05 {
label="pending list";
- node [style=filled, fillcolor=red];
- n1 -> n2 -> n3 -> n4;
+ node [fillcolor=red, label="pend. entries"];
+ n1 -> n2 -> n3 -> n4 -> n5;
}
m1 -> e1;
@@ -88,6 +91,8 @@ digraph "gin" {
e7 -> p5;
m1 -> n1;
- e5 [style=filled, fillcolor=green4];
- e7 [style=filled, fillcolor=green4];
+ // An explanation for readers
+ expl [shape=plaintext, fillcolor=green, label=" A <posting list> is a list of heap pointers (row IDs) "];
+ p6 -> expl [style=invis];
+
}
Screenshot from 2019-07-07 15-12-37.png (image/png, 33.3K) download
view image
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Improvement of GIN figure
@ 2019-07-09 07:20 Oleg Bartunov <obartunov@postgrespro.ru>
parent: Jürgen Purtz <juergen@purtz.de>
0 siblings, 1 reply; 6+ messages in thread
From: Oleg Bartunov @ 2019-07-09 07:20 UTC (permalink / raw)
To: Jürgen Purtz <juergen@purtz.de>; +Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
On Sun, Jul 7, 2019 at 4:18 PM Jürgen Purtz <juergen@purtz.de> wrote:
>
> To increase the consistency between the surrounding, explaining text and
> the figure, there are some changes and additions to the texts within the
> figure.
Sorry, I may missed the discussion of what colors and fonts we accept
for our documentation, but
the color and fonts used I don't like. I attached our version of GIN figure.
>
> Also: Added a hint in README for ditaa developers.
>
>
> Jürgen Purtz
>
>
--
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
gin.jpg (image/jpeg, 257.5K) download
view image
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Improvement of GIN figure
@ 2019-07-09 20:53 Peter Geoghegan <pg@bowt.ie>
parent: Oleg Bartunov <obartunov@postgrespro.ru>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Geoghegan @ 2019-07-09 20:53 UTC (permalink / raw)
To: Oleg Bartunov <obartunov@postgrespro.ru>; +Cc: Jürgen Purtz <juergen@purtz.de>; Pg Docs <pgsql-docs@lists.postgresql.org>
On Tue, Jul 9, 2019 at 12:20 AM Oleg Bartunov <obartunov@postgrespro.ru> wrote:
> Sorry, I may missed the discussion of what colors and fonts we accept
> for our documentation, but
> the color and fonts used I don't like. I attached our version of GIN figure.
I agree that the existing colors look awful, and that muted pastel
colors would work better. Doesn't seem like something that should
happen at the cost of making the diagram less informative, though.
--
Peter Geoghegan
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Improvement of GIN figure
@ 2019-07-09 22:22 Tatsuo Ishii <ishii@sraoss.co.jp>
parent: Peter Geoghegan <pg@bowt.ie>
0 siblings, 1 reply; 6+ messages in thread
From: Tatsuo Ishii @ 2019-07-09 22:22 UTC (permalink / raw)
To: pg@bowt.ie; +Cc: obartunov@postgrespro.ru; juergen@purtz.de; pgsql-docs@lists.postgresql.org
> I agree that the existing colors look awful, and that muted pastel
> colors would work better. Doesn't seem like something that should
> happen at the cost of making the diagram less informative, though.
I am not an expert in the area but I think we should cosider people
with color disability.
https://www.invisionapp.com/inside-design/color-accessibility-product-design/
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Improvement of GIN figure
@ 2019-07-09 22:29 Peter Geoghegan <pg@bowt.ie>
parent: Tatsuo Ishii <ishii@sraoss.co.jp>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Geoghegan @ 2019-07-09 22:29 UTC (permalink / raw)
To: Tatsuo Ishii <ishii@sraoss.co.jp>; +Cc: Oleg Bartunov <obartunov@postgrespro.ru>; Jürgen Purtz <juergen@purtz.de>; Pg Docs <pgsql-docs@lists.postgresql.org>
On Tue, Jul 9, 2019 at 3:22 PM Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
> > I agree that the existing colors look awful, and that muted pastel
> > colors would work better. Doesn't seem like something that should
> > happen at the cost of making the diagram less informative, though.
>
> I am not an expert in the area but I think we should cosider people
> with color disability.
Good point. I think that that shouldn't be too hard to mostly get right.
It's good that the diagrams will already work with a screen reader.
--
Peter Geoghegan
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Improvement of GIN figure
@ 2019-07-13 10:11 Jürgen Purtz <juergen@purtz.de>
parent: Peter Geoghegan <pg@bowt.ie>
0 siblings, 0 replies; 6+ messages in thread
From: Jürgen Purtz @ 2019-07-13 10:11 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org
> On Tue, Jul 9, 2019 at 3:22 PM Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
>>> I agree that the existing colors look awful, and that muted pastel
>>> colors would work better. Doesn't seem like something that should
>>> happen at the cost of making the diagram less informative, though.
>> I am not an expert in the area but I think we should cosider people
>> with color disability.
> Good point. I think that that shouldn't be too hard to mostly get right.
>
> It's good that the diagrams will already work with a screen reader.
>
Due to the discussions of recent days as well as some improvements of
the graphiz know-how, the graphic is subject to many changes: different
colors (variations of 'PG blue', and possibly helpful for people with
color vision deficiency), a different font (adaption to the font in PG's
documentation), changes in the meaning and explanation of nodes (as a
result of discussion with Oleg Bartunov), introduction of a - hopefully
unobtrusive - background color (to circumvent graphic from text), use of
DOT syntax.
Attachments:
gin.patch (text/x-patch, 6.4K) download
diff --git a/doc/src/sgml/images/README b/doc/src/sgml/images/README
index 07c4580255..c451d4bca4 100644
--- a/doc/src/sgml/images/README
+++ b/doc/src/sgml/images/README
@@ -13,7 +13,8 @@ involve diffable source files.
These tools are acceptable:
- Graphviz (https://graphviz.org/)
-- Ditaa (http://ditaa.sourceforge.net/)
+- Ditaa (https://github.com/stathissideris/ditaa), version 0.11 or
+ higher. Previous versions does not support SVG.
We use SVG as the format for integrating the image into the ultimate
output formats of the documentation, that is, HTML, PDF, and others.
diff --git a/doc/src/sgml/images/gin.gv b/doc/src/sgml/images/gin.gv
index 097e91029a..35520736ec 100644
--- a/doc/src/sgml/images/gin.gv
+++ b/doc/src/sgml/images/gin.gv
@@ -1,85 +1,101 @@
digraph "gin" {
+
layout=dot;
- node [label="", shape=box, style=filled, fillcolor=gray, width=1.4];
- m1 [label="meta page"];
+ // default values
+ node [shape=box, label="", fontname="sans-serif", style=filled, fillcolor=lightgray, width=1.4];
+ graph [fontname="sans-serif"]; // must be specified separately
+ edge [fontname="sans-serif"]; // must be specified separately
+
+ // an unobtrusive background color
+ pad="1.0, 0.5";
+ bgcolor=whitesmoke;
+ // The top node
+ m1 [label="meta page", style=filled, fillcolor=beige];
+
+ // other nodes
subgraph cluster01 {
- label="entry tree";
- subgraph egroup1 {
- rank=same;
- e1;
- }
- subgraph egroup2 {
- rank=same;
- e2 -> e3 -> e4;
- }
- subgraph egroup3 {
- rank=same;
- e5 -> e6 -> e7 -> e8 -> e9;
- }
- e1 -> e4;
- e1 -> e3;
- e1 -> e2;
- e2 -> e5;
- e2 -> e6;
- e3 -> e7;
- e4 -> e8;
- e4 -> e9;
-
- e6 [fillcolor=green, label="posting list"];
- e8 [fillcolor=green, label="posting list"];
- e9 [fillcolor=green, label="posting list"];
+ bgcolor=white;
+ label="entry tree";
+ subgraph egroup1 {
+ rank=same;
+ e1;
+ }
+ subgraph egroup2 {
+ rank=same;
+ e2 -> e3 -> e4;
+ }
+ subgraph egroup3 {
+ rank=same;
+ e5 -> e6 -> e7 -> e8 -> e9;
+ }
+ e1 -> e4;
+ e1 -> e3;
+ e1 -> e2;
+ e2 -> e5;
+ e2 -> e6;
+ e3 -> e7;
+ e4 -> e8;
+ e4 -> e9;
+
+ e5 [fillcolor=cyan];
+ e6 [fillcolor=cyan];
+ e7 [fillcolor=cyan];
+ e8 [fillcolor=cyan];
+ e9 [fillcolor=cyan];
+
}
subgraph cluster02 {
- label="posting tree";
- subgraph pgroup1 {
- rank=same;
- p1;
- }
- subgraph pgroup2 {
- rank=same;
- p2 -> p3;
- }
- p1 -> p2;
- p1 -> p3;
-
- p2 [fillcolor=green, label="heap ptr"];
- p3 [fillcolor=green, label="heap ptr"];
+ bgcolor=white;
+ label="posting tree";
+ subgraph pgroup1 {
+ p1;
+ }
+ subgraph pgroup2 {
+ rank=same;
+ p2 -> p3;
+ }
+ p1 -> p2;
+ p1 -> p3;
+
+ p2 [fillcolor=deepskyblue];
+ p3 [fillcolor=deepskyblue];
}
subgraph cluster03 {
- label="posting tree";
- subgraph pgroup3 {
- rank=same;
- p4;
- }
+ bgcolor=white;
+ label="posting tree";
+ subgraph pgroup3 {
+ p4;
+ }
- p4 [fillcolor=green, label="heap ptr"];
+ p4 [fillcolor=deepskyblue];
}
subgraph cluster04 {
- label="posting tree";
- subgraph pgroup4 {
- rank=same;
- p5;
- }
- subgraph pgroup5 {
- rank=same;
- p6 -> p7;
- }
- p5 -> p6;
- p5 -> p7;
-
- p6 [fillcolor=green, label="heap ptr"];
- p7 [fillcolor=green, label="heap ptr"];
+ bgcolor=white;
+ label="posting tree";
+ subgraph pgroup4 {
+ p5;
+ }
+ subgraph pgroup5 {
+ rank=same;
+ p6 -> p7;
+ }
+ p5 -> p6;
+ p5 -> p7;
+
+ p6 [fillcolor=deepskyblue];
+ p7 [fillcolor=deepskyblue];
}
subgraph cluster05 {
- label="pending list";
- node [style=filled, fillcolor=red];
- n1 -> n2 -> n3 -> n4;
+ bgcolor=white;
+ label="pending list";
+ node [fillcolor=wheat, label="pending entries", width=1.8];
+ n1 -> n2 -> n3 -> n4 -> n5;
}
m1 -> e1;
@@ -88,6 +104,12 @@ digraph "gin" {
e7 -> p5;
m1 -> n1;
- e5 [style=filled, fillcolor=green4];
- e7 [style=filled, fillcolor=green4];
+ // Explanations
+ expl_1 [shape=plaintext, width=2.5, label="Internal tree node"];
+ expl_2 [shape=plaintext, fillcolor=cyan, width=5.2, label="<posting list> and/or pointer to <posting tree>"];
+ expl_3 [shape=plaintext, fillcolor=deepskyblue, width=2.0, label="Only <posting list>"];
+ p6 -> expl_1 [style=invis];
+ p6 -> expl_2 [style=invis];
+ p6 -> expl_3 [style=invis];
+
}
gin.gv (text/vnd.graphviz, 3.3K) download
digraph "gin" {
layout=dot;
// default values
node [shape=box, label="", fontname="sans-serif", style=filled, fillcolor=lightgray, width=1.4];
graph [fontname="sans-serif"]; // must be specified separately
edge [fontname="sans-serif"]; // must be specified separately
// an unobtrusive background color
pad="1.0, 0.5";
bgcolor=whitesmoke;
// The top node
m1 [label="meta page", style=filled, fillcolor=beige];
// other nodes
subgraph cluster01 {
bgcolor=white;
label="entry tree";
subgraph egroup1 {
rank=same;
e1;
}
subgraph egroup2 {
rank=same;
e2 -> e3 -> e4;
}
subgraph egroup3 {
rank=same;
e5 -> e6 -> e7 -> e8 -> e9;
}
e1 -> e4;
e1 -> e3;
e1 -> e2;
e2 -> e5;
e2 -> e6;
e3 -> e7;
e4 -> e8;
e4 -> e9;
e5 [fillcolor=cyan];
e6 [fillcolor=cyan];
e7 [fillcolor=cyan];
e8 [fillcolor=cyan];
e9 [fillcolor=cyan];
}
subgraph cluster02 {
bgcolor=white;
label="posting tree";
subgraph pgroup1 {
p1;
}
subgraph pgroup2 {
rank=same;
p2 -> p3;
}
p1 -> p2;
p1 -> p3;
p2 [fillcolor=deepskyblue];
p3 [fillcolor=deepskyblue];
}
subgraph cluster03 {
bgcolor=white;
label="posting tree";
subgraph pgroup3 {
p4;
}
p4 [fillcolor=deepskyblue];
}
subgraph cluster04 {
bgcolor=white;
label="posting tree";
subgraph pgroup4 {
p5;
}
subgraph pgroup5 {
rank=same;
p6 -> p7;
}
p5 -> p6;
p5 -> p7;
p6 [fillcolor=deepskyblue];
p7 [fillcolor=deepskyblue];
}
subgraph cluster05 {
bgcolor=white;
label="pending list";
node [fillcolor=wheat, label="pending entries", width=1.8];
n1 -> n2 -> n3 -> n4 -> n5;
}
m1 -> e1;
e5 -> p1;
e7 -> p4;
e7 -> p5;
m1 -> n1;
// Explanations
expl_1 [shape=plaintext, width=2.5, label="Internal tree node"];
expl_2 [shape=plaintext, fillcolor=cyan, width=5.2, label="<posting list> and/or pointer to <posting tree>"];
expl_3 [shape=plaintext, fillcolor=deepskyblue, width=2.0, label="Only <posting list>"];
p6 -> expl_1 [style=invis];
p6 -> expl_2 [style=invis];
p6 -> expl_3 [style=invis];
}
Screenshot from 2019-07-13 12-07-08.png (image/png, 39.3K) download
view image
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2019-07-13 10:11 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-07 13:18 Improvement of GIN figure Jürgen Purtz <juergen@purtz.de>
2019-07-09 07:20 ` Oleg Bartunov <obartunov@postgrespro.ru>
2019-07-09 20:53 ` Peter Geoghegan <pg@bowt.ie>
2019-07-09 22:22 ` Tatsuo Ishii <ishii@sraoss.co.jp>
2019-07-09 22:29 ` Peter Geoghegan <pg@bowt.ie>
2019-07-13 10:11 ` Jürgen Purtz <juergen@purtz.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox