-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
harsha
committed
Feb 7, 2024
1 parent
164884b
commit 3429f79
Showing
5 changed files
with
68 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
graph G { | ||
layout=neato; | ||
size="10,5"; | ||
node [fontname="Helvetica", fontsize=7, shape = circle, width=0.15, fixedsize=true, style="filled", fillcolor="cyan"]; | ||
1 -- 4 [fontsize=9, fontname="Helvetica", len=0.5]; | ||
2 -- 4 [fontsize=9, fontname="Helvetica", len=0.5]; | ||
3 -- 4 [fontsize=9, fontname="Helvetica", len=0.5]; | ||
3 -- 5 [fontsize=9, fontname="Helvetica", len=0.5]; | ||
} |
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,52 @@ | ||
\documentclass[tikz]{standalone} | ||
\usepackage{fontspec} | ||
\setmainfont{Latin Modern Math} | ||
\usetikzlibrary{arrows} | ||
\usetikzlibrary{graphs} | ||
\usetikzlibrary{graphdrawing} | ||
|
||
% from: https://tex.stackexchange.com/questions/453132/fresh-install-of-tl2018-no-tikz-graph-drawing-libraries-found | ||
\usepackage{luacode} | ||
\begin{luacode*} | ||
function pgf_lookup_and_require(name) | ||
local sep = package.config:sub(1,1) | ||
local function lookup(name) | ||
local sub = name:gsub('%.',sep) | ||
if kpse.find_file(sub, 'lua') then | ||
require(name) | ||
elseif kpse.find_file(sub, 'clua') then | ||
collectgarbage('stop') | ||
require(name) | ||
collectgarbage('restart') | ||
else | ||
return false | ||
end | ||
return true | ||
end | ||
return | ||
lookup('pgf.gd.' .. name .. '.library') or | ||
lookup('pgf.gd.' .. name) or | ||
lookup(name .. '.library') or | ||
lookup(name) | ||
end | ||
\end{luacode*} | ||
|
||
\usegdlibrary{force} | ||
\begin{document} | ||
\begin{tikzpicture}[] | ||
\graph [spring electrical layout, random seed = 42, electric charge=1.0,, ] { | ||
1/"1" [draw, rounded corners, fill=blue!10], | ||
2/"2" [draw, rounded corners, fill=blue!10], | ||
3/"3" [draw, rounded corners, fill=blue!10], | ||
4/"4" [draw, rounded corners, fill=blue!10], | ||
5/"5" [draw, rounded corners, fill=blue!10], | ||
; | ||
1 -- [,edge label={11.27},] 4; | ||
2 -- [,edge label={13.67},] 4; | ||
3 -- [,edge label={29.12},] 4; | ||
3 -- [,edge label={27.75},] 5; | ||
}; | ||
|
||
\end{tikzpicture} | ||
|
||
\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