-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for dependent variables in vis (#26)
This should also fix styles. I added some helpful checks for whether intermediate directories exist when you try to write a graph to a path.
- Loading branch information
Showing
7 changed files
with
77 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.aux | ||
*.synctex.gz |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
|
||
\documentclass{standalone} | ||
\usepackage{tikz} | ||
|
||
\usetikzlibrary{graphs,graphdrawing,quotes} | ||
\usegdlibrary{force,layered} | ||
\begin{document} | ||
|
||
\begin{tikzpicture}[cause/.style={draw=red, "causes", text=red, densely dotted}, | ||
associate/.style={draw=red, "assoc."}, | ||
\begin{tikzpicture}[causes/.style={draw=black, "cause", text=black}, | ||
associates/.style={draw=black, "assoc."}, | ||
min/.style={minimum size=2cm}, | ||
unit/.style={min,draw=black}, | ||
measure/.style={min,circle,draw=black}, | ||
dv/.style={draw=blue}] | ||
|
||
has/.style={densely dotted}, | ||
nests/.style={dashed}, | ||
depvar/.style={draw=none,fill=grey!30}] | ||
|
||
\graph[layered layout,sibling distance=3cm,level distance=3cm]{ | ||
member[unit, draw=red] -> [has] pounds lost[measure, fill=grey!30]; | ||
member[unit] -> [has] pounds lost[measure,depvar]; | ||
member -> [has] age[measure]; | ||
member -> [has] age*motivation[measure]; | ||
member -> [has] race group[measure]; | ||
pounds lost -> [associate] race group; | ||
pounds lost -> [associate] age*motivation; | ||
motivation[measure] -> [cause] pounds lost; | ||
race group -> [associate] pounds lost; | ||
age*motivation -> [associate] pounds lost; | ||
|
||
pounds lost -> [associates] race group; | ||
pounds lost -> [associates] Week[measure]; | ||
pounds lost -> [associates] age*motivation; | ||
motivation[measure] -> [causes] pounds lost; | ||
race group -> [associates] pounds lost; | ||
Week -> [associates] pounds lost; | ||
age*motivation -> [associates] pounds lost; | ||
|
||
}; | ||
\end{tikzpicture} | ||
\end{document} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters