Relation Graph Improvements

Want to help out? Need help accessing the AniDB API? This is the place to ask questions.

Moderator: AniDB

egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Post by egg »

Since stuff came up again over here, I thought I would revive this...
Elberet wrote:Exp, for better readability of the graphs, would it be possible to fix the generation algorithm so that it tries its best to place sequels directly below their prequel and parent stories somewhere below side stories?
Basically it has to do with the direction the original relation was created.

If someone went to A and create a sequel relation to B then the graph would be:

Code: Select all

A
^
|
v
B
But if they go to B and create a prequel relation to A then the graph would be:

Code: Select all

B
^
|
v
A
This has to do with the way the information is sent to the graphing program. I had done some expieriments and changing the order in the configuration file for the graph would change the layout to be correct.

There are two ways to make the graphs have a better representation:

1) Always have the links go in order from prequel to sequel in the configuration file. This will not work for all relation types though, which comes first in a character relation? (This is the one you suggested.)

2) Always have the links go in order from oldest anime to newest based on the dates. This would have the original anime at the top and the others below it. Although there can be some cases where the prequel will be below the sequel (like kenshin), it will be because it was created later. In cases like this, you may elect to watch them in the order created, not the prequel/sequel order. This would also partially take care of the request, Viewing order in graph.
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

hm,

this might be worth a try, however this would be really low priority and I don't know when I'd get the time to play with it.

BYe!
EXP
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

I would definitely choose 1st method.
Changing configuration files is small (i've also dome small experiments and it looks promising, simple change from
5 -> 2673 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
into
2673 -> 5 [headlabel="prequel", taillabel="sequel", color=red, dir=both];
make much better results), maybe it will not helps in every cases but at least some error in graphs like:
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=284
http://anidb.ath.cx/perl-bin/animedb.pl?show=rel&aid=35
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=535
will be fixed

And for the second method
- ordering of action would be messed sometimes (Kenshin is not only example, maybe most known only) - to find what is prequel and what is sequel would be much harder,
- ordering by dates is not allways easy, what should be order if two titles are from same year?
http://anidb.ath.cx/perl-bin/animedb.pl?show=rel&aid=35
what if years are overlapping?
http://anidb.ath.cx/perl-bin/animedb.pl?show=rel&aid=90
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=193
egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Post by egg »

Elias wrote:I would definitely choose 1st method.
Changing configuration files is small (i've also dome small experiments and it looks promising, simple change from
5 -> 2673 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
into
2673 -> 5 [headlabel="prequel", taillabel="sequel", color=red, dir=both];
make much better results), maybe it will not helps in every cases but at least some error in graphs like:
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=284
http://anidb.ath.cx/perl-bin/animedb.pl?show=rel&aid=35
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=535
will be fixed
What about non prequel/sequel relations? For instance, even if you fix the prequel/sequels there will still be a mess for some. Look at tenchi.
Elias wrote:And for the second method
- ordering of action would be messed sometimes (Kenshin is not only example, maybe most known only) - to find what is prequel and what is sequel would be much harder,
True, it would not be as obvious, maybe the link color could be changed or something, but I think the date approach is better.
Elias wrote:- ordering by dates is not allways easy, what should be order if two titles are from same year?
http://anidb.ath.cx/perl-bin/animedb.pl?show=rel&aid=35
Fortunately most animes (including these) have a full date, not just a year, so these are easily resolved.
Go by the start date.

In the case where the dates cannot be resolved (exactly the same day, only year information or no date), go back and apply rule #1.
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

egg wrote:What about non prequel/sequel relations? For instance, even if you fix the prequel/sequels there will still be a mess for some. Look at tenchi.
I have to check it for this one, but i think at least this change will place in order (sequel below prequel):
Mihoshi Special
Magical Girl Pretty Sammy
Magical Project S

And if adding another simple exchange ("parent story" before "side story") also will place better "Tenchi Muyo! in Love" below "Tenchi Universe".
egg wrote:
Elias wrote:And for the second method
- ordering of action would be messed sometimes (Kenshin is not only example, maybe most known only) - to find what is prequel and what is sequel would be much harder,
True, it would not be as obvious, maybe the link color could be changed or something, but I think the date approach is better.
And i prefer simpler graphs (there are already 3 colors of links), where you see how story of animes continues through different titles, release date is only additional info, not usable when following the story.
egg wrote:Fortunately most animes (including these) have a full date, not just a year, so these are easily resolved.
Unfortunately there are older animes without full date, even Tenchi example has some of them.
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

i fail to see why these graphs need any changes at all.
IMHO it's much better this way compared to having them all in one line as
that would require scrolling.

BYe!
EXP
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

Require scrolling? Those will look like this one:
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=132
which fits on my screen - no scrolling required.
And even if scrolling will be required i prefer placing titles in line, than messing them in circle (scrolling is not required, but graph is unreadable):
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=345

About Tenchi graph, see results of my experiments:
http://www.fortunecity.de/tatooine/kubr ... p/dot.html
(years and number of episodes are incorrect)
Animes and arrows in input files are ordered by aid,
only sequel->prequel are replaced by prequel->sequel
and side story -> parent story by parent story -> side story

The second graph is after deleting 2 redundant relations.
Input file is this:

Code: Select all


digraph groupgraph {
	bgcolor="#BFC2C9"
	edge [fontsize=7, fontname="Verdana", labelfontsize=7, labelfontname="Verdana", labeldistance=1.3, lableangle="-30", arrowsize=.8, minlen=2];
	node [fontsize=9, fontname="Verdana", shape=plaintext];
	//rankdir=LR;
	205 -> 337 [label="alternative settings", color=blue, dir=both];
	205 -> 358 [label="same settings", color=green, dir=both];
	205 -> 375 [label="alternative settings", color=blue, dir=both];
	205 -> 409 [label="alternative settings", color=blue, dir=both];
	205 -> 759 [label="alternative settings", color=blue, dir=both];
	// this one looks redundant
	205 -> 1075 [label="alternative settings", color=blue, dir=both];
	205 -> 2508 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
	359 -> 376 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
	409 -> 359 [headlabel="side story", taillabel="parent story", color=orange, dir=both];
	// this one looks redundant too
	409 -> 376 [headlabel="side story", taillabel="parent story", color=orange, dir=both];
	759 -> 1075 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
	1075 -> 741 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
	2508 -> 2509 [headlabel="sequel", taillabel="prequel", color=red, dir=both];
	2509 -> 2510 [headlabel="sequel", taillabel="prequel", color=red, dir=both];


	205 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! Ryo-Ohki</TD></TR>
	    <TR><TD>0</TD><TD>2006 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=2673", tooltip="Seikai no Senki III"];
	
	337 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi in Tokyo</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	358 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo GXP</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	359 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! in Love</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	375 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! Manatsu no Eve</TD></TR>
	    <TR><TD>13</TD><TD>2000 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=4", tooltip="Seikai no Senki"];
	
	376 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! in Love 2 - Haruka Naru ...</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	409 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Universe</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	741 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Magical Project S</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	759 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo: Mihoshi Special</TD></TR>
	    <TR><TD>13</TD><TD>1999 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=1", tooltip="Seikai no Monshou"];
	
	1075 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Magical Girl Pretty Sammy</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	2508 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! The Night Before The Car...</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	2509 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! Ryo-Ohki 2</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

	2510 [label=<
	<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
	    <TR><TD BGCOLOR="#C8CAD1" BORDER="1">TV</TD><TD> </TD></TR>
	    <TR><TD BGCOLOR="#C8CAD1" COLSPAN="2" BORDER="1" PORT="name">
	    <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	    <TR><TD BGCOLOR="#D0DEF2" COLSPAN="2">Tenchi Muyo! Ryo-Ohki 3</TD></TR>
	    <TR><TD>10</TD><TD>2001 </TD></TR></TABLE></TD></TR>
	</TABLE>>
	, URL="http://anidb.ath.cx/perl-bin/animedb.pl?show=anime&aid=5", tooltip="Seikai no Senki 2"];

}
Skywalka
Posts: 889
Joined: Tue Sep 16, 2003 7:57 pm

Post by Skywalka »

Elias wrote:Require scrolling? Those will look like this one:
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=132
which fits on my screen - no scrolling required.
And even if scrolling will be required i prefer placing titles in line, than messing them in circle (scrolling is not required, but graph is unreadable):
http://anidb.ath.cx/perl-bin/animedb.pl ... el&aid=345
That rel graph for BBC is pretty messed up. How can the first anime have a sequel and that one another sequel, but the first only have one or more characters in the third? EITHER there are all the same things happening in the second compared to the first, which would make it a sequel, and then the same stuff is happening in the same place and time and setting in the third to make it another sequel of the sequel OR the third one only has a character from the first one in it. It can't be both.

Same goes to the "same setting" rel from the third to the fith. Either you split 3 and 5 to the sides or you delete the "character" and "setting" relations.
Elias wrote:About Tenchi graph, see results of my experiments:
http://www.fortunecity.de/tatooine/kubr ... p/dot.html
(years and number of episodes are incorrect)
Animes and arrows in input files are ordered by aid,
only sequel->prequel are replaced by prequel->sequel
and side story -> parent story by parent story -> side story
The second image (the bottom one) is the the version I _strongly_ encourage should be enforced on AniDB.

All those side-story, character and setting rels that are double-backed really mess up the rel charts. If a new anime has the same setting, and then has a sequel, it isn't necessary to indicate that the sequel is also in the same setting as the parent anime. That's like adding a line from every grandfather in a family tree to every sibling of their siblings and of their siblings. It's supposed to be a tree, with a trunk, branches, smaller branches, tiny branches, and leaves on the end. Not a trunk with branches thick branches to every Leaf. Only kids draw such trees ;-)
egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Post by egg »

exp wrote:
i fail to see why these graphs need any changes at all.
IMHO it's much better this way compared to having them all in one line as
that would require scrolling.
I disagree, having them in a consistent order makes it easier to tell where things really belong. In these small graphs it's not that big of a deal, but it does get messy for the bigger ones. The fact that these two just ended up like that is a coincidence, technically, depending on how people created the relations it could have been a straight line with the prequels at the bottom and sequels at the top.
Skywalka wrote:The second image (the bottom one) is the the version I _strongly_ encourage should be enforced on AniDB.

All those side-story, character and setting rels that are double-backed really mess up the rel charts. If a new anime has the same setting, and then has a sequel, it isn't necessary to indicate that the sequel is also in the same setting as the parent anime. That's like adding a line from every grandfather in a family tree to every sibling of their siblings and of their siblings. It's supposed to be a tree, with a trunk, branches, smaller branches, tiny branches, and leaves on the end. Not a trunk with branches thick branches to every Leaf. Only kids draw such trees
This is an issue, but it is independant of what we are discussing here. This can be handled in the current system with appropriate creqs and or posts in the DB Change forum.

There are two basic proposals, 1 to sort by prequel/sequel order first, the other is to sort by date first, then the secondary sort would be the other one. So this is how I see it:
Elias' Method:
1) Make the links output from prequel->sequel, parent story->side story, full story->summary order
2) Other links should be output in date order (based on the start date)
3) If the date is not distinguishable, output in the order created (current default)

egg's Method:
1) Links should be output in date order (based on the start date)
2) If the date is not distinguishable, make the links output from prequel->sequel, parent story->side story, full story->summary order
3) Other links should be output in the order created (current default)
egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Post by egg »

*bump* because of this discussion. If no one has any further comments, I will go ahead and submit the following to the tracker.
egg wrote:There are two basic proposals, 1 to sort by prequel/sequel order first, the other is to sort by date first, then the secondary sort would be the other one. So this is how I see it:
Elias' Method:
1) Make the links output from prequel->sequel, parent story->side story, full story->summary order
2) Other links should be output in date order (based on the start date)
3) If the date is not distinguishable, output in the order created (current default)

egg's Method:
1) Links should be output in date order (based on the start date)
2) If the date is not distinguishable, make the links output from prequel->sequel, parent story->side story, full story->summary order
3) Other links should be output in the order created (current default)
Locked