juliatex / tikzgraphs.jl Goto Github PK
View Code? Open in Web Editor NEWThis library generates graph layouts using the TikZ graph layout package.
License: Other
This library generates graph layouts using the TikZ graph layout package.
License: Other
When I try to add TikzGraphs I am getting an error "Unsatisfiable requirements detected for package DataStructures [864edb3b]".
I'm using a completely fresh version of Julia 1.6 (i.e. with no other packages installed).
Here's the full terminal output:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.0 (2021-03-24)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Pkg
julia> Pkg.add("TikzGraphs")
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataStructures [864edb3b]:
DataStructures [864edb3b] log:
├─DataStructures [864edb3b] has no known versions!
└─found to have no compatible versions left with LightGraphs [093fc24a]
└─LightGraphs [093fc24a] log:
├─possible versions are: 0.13.0-1.3.5 or uninstalled
└─restricted by compatibility requirements with TikzGraphs [b4f28e30] to versions: 0.13.1-1.3.5
└─TikzGraphs [b4f28e30] log:
├─possible versions are: 0.7.0-1.1.0 or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions 0.7.0-1.1.0
Stacktrace:
[1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
@ Pkg.Resolve /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Resolve/graphtype.jl:1048
[2] propagate_constraints! (repeats 2 times)
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Resolve/graphtype.jl:989 [inlined]
[3] simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; clean_graph::Bool)
@ Pkg.Resolve /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Resolve/graphtype.jl:1503
[4] simplify_graph! (repeats 2 times)
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Resolve/graphtype.jl:1503 [inlined]
[5] resolve_versions!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:404
[6] targeted_resolve(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel)
@ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1208
[7] tiered_resolve(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1194
[8] _resolve
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1214 [inlined]
[9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
@ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1229
[10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:197
[11] add
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:148 [inlined]
[12] add(pkgs::Vector{Pkg.Types.PackageSpec}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:73
[13] add
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:72 [inlined]
[14] #add#21
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:70 [inlined]
[15] add
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:70 [inlined]
[16] #add#20
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:69 [inlined]
[17] add(pkg::String)
@ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:69
[18] top-level scope
@ REPL[2]:1
julia> Pkg.status()
Status `~/.julia/environments/v1.6/Project.toml` (empty project)
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
On IJulia in Julia 0.7
plot(G)
IOError: could not spawn `pdf2svg ./tmpgQGIAG/tikzpicture.pdf ./tmpgQGIAG/tikzpicture.svg`: no such file or directory (ENOENT)
Stacktrace:
[1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at ./process.jl:370
[2] (::getfield(Base, Symbol("##499#500")){Cmd})(::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at ./process.jl:512
[3] setup_stdio(::getfield(Base, Symbol("##499#500")){Cmd}, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at ./process.jl:493
[4] #_spawn#498(::Nothing, ::Function, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at ./process.jl:511
[5] #_spawn at ./none:0 [inlined]
[6] #_spawn#504 at ./process.jl:551 [inlined]
[7] _spawn at ./process.jl:551 [inlined]
[8] success(::Cmd) at ./process.jl:708
[9] save(::TikzPictures.SVG, ::TikzPictures.TikzPicture) at /Users/tomer/.julia/packages/TikzPictures/b9irC/src/TikzPictures.jl:391
[10] save(::TikzPictures.SVG, ::TikzPictures.TikzPicture) at /Users/tomer/.julia/packages/TikzPictures/b9irC/src/TikzPictures.jl:383
[11] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at /Users/tomer/.julia/packages/TikzPictures/b9irC/src/TikzPictures.jl:441
[12] limitstringmime at /Users/tomer/.julia/packages/IJulia/0cLgR/src/inline.jl:36 [inlined]
[13] display_mimestring(::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at /Users/tomer/.julia/packages/IJulia/0cLgR/src/execute_request.jl:73
[14] display_dict(::TikzPictures.TikzPicture) at /Users/tomer/.julia/packages/IJulia/0cLgR/src/execute_request.jl:101
[15] #invokelatest#1 at ./essentials.jl:691 [inlined]
[16] invokelatest at ./essentials.jl:690 [inlined]
[17] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /Users/tomer/.julia/packages/IJulia/0cLgR/src/execute_request.jl:256
[18] #invokelatest#1 at ./essentials.jl:691 [inlined]
[19] invokelatest at ./essentials.jl:690 [inlined]
[20] eventloop(::ZMQ.Socket) at /Users/tomer/.julia/packages/IJulia/0cLgR/src/eventloop.jl:8
[21] (::getfield(IJulia, Symbol("##12#15")))() at ./task.jl:262
Obviously, I'm trying to plot the resulting graph from project 1 🙂!
The labels are dropped when I specify a layout:
e.g.
display(TikzGraphs.plot(graph, Layouts.Spring(randomSeed=52), labels=make_string(cat(1,demand, train_load)), node_style="draw, rounded corners, fill=blue!10", node_styles=Dict(graph.vertices[end]=>"fill=green!10")))
where:
function make_string(int_array::Array{Int64})
out_array = Array{String}(length(int_array))
for i in 1:length(int_array)
out_array[i] = string(i)
end
return out_array::Array{String}
end
You'll notice the labels are just the node numbers.
Maybe this is an issue with my environment?
[ Info: Precompiling TikzGraphs [b4f28e30-c73f-5eaf-a395-8a9db949a742]
WARNING: could not import LaTeXStrings.@L_mstr into TikzPictures
Since LightGraphs.jl seized development, which is now being continued at Graphs.jl, it might be better to make TikzGraphs.jl depend on Graphs.jl, in order to use Graphs.jl along with TikzGraphs.jl in other projects.
Error 503 first byte timeout
first byte timeout
Guru Mediation:
Details: cache-bma7031-BMA 1481631868 1664798385
Varnish cache server
A trivial graph with
g = DiGraph(2)
add_edge!(g, 1, 2)
t = TikzGraphs.plot(g)
TikzPictures.save(TEX("tpic"), t)
creates a tex file that produces an error when processed with lualatex (so save(SVG(...)), etc., produce the same error):
! Argument of \next has an extra }.
<inserted text>
\par
l.11 \ProvidesFileRCS{pgfsys-luatex.def}
This is with the latest texlive (2021) on Debian 10.
Pkg.update()
doesn't seem to be pulling in v0.5.1
which has the precompile flag enabled and depwarns removed. It's breaking travis on downstream packages that use precompilation. Can we update meta? or should I try to work around it?
using TikzGraphs
using LightGraphs
g = Graph(4)
add_edge!(g, 1, 2)
add_edge!(g, 2, 3)
TikzGraphs.plot(g)
Undirected graphs are currently plotted with arrows.
The #
character inside a graph label seems to get interpreted as a LaTeX parameter marker, which causes a LaTeX error. Here's a minimal example:
using LightGraphs
using TikzGraphs
g = DiGraph(2)
add_edge!(g, 1, 2)
TikzGraphs.plot(g, ["foo#", "bar"])
which produces:
! Illegal parameter number in definition of \pgfutil@reserved@a.
<to be read again>
"
l.15 }
;
Error saving as SVG
LaTeX error
julia> versioninfo()
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, sandybridge)
julia> Pkg.installed("TikzGraphs")
v"0.3.0"
julia> run(`latex --version`)
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with xpdf version 3.04
Hi,
Thanks for maintaining the package. I was trying to go through the notebook tutorial here and was getting errors on the most basic example.
Here's the simplest MWE possible:
using Graphs, TikzGraphs
TikzGraphs.plot(DiGraph(1))
Which gave me
ERROR: MethodError: no method matching plot(::SimpleDiGraph{Int64})
Closest candidates are:
plot(::Any, ::TikzGraphs.Layouts.Layout) at /home/renatogeh/.julia/packages/TikzGraphs/tob6G/src/TikzGraphs.jl:44
plot(::Any, ::TikzGraphs.Layouts.Layout, ::Vector{T}; args...) where T<:AbstractString at /home/renatogeh/.julia/packages/TikzGraphs/tob6G/src/TikzGraphs.jl:44
plot(::Any, ::Vector{T}; args...) where T<:AbstractString at /home/renatogeh/.julia/packages/TikzGraphs/tob6G/src/TikzGraphs.jl:45
...
Stacktrace:
[1] top-level scope
@ REPL[2]:1
With all latest versions:
My first guess was that it was not recognizing SimpleDiGraph{Int64}
as an AbstractGraph
for some reason. Indeed, if I pass a Layout
the function goes through fine.
TikzGraphs.plot(DiGraph(1), Layouts.Spring())
But complains about something else.
ERROR: MethodError: no method matching vertices(::SimpleDiGraph{Int64})
Closest candidates are:
vertices(::LightGraphs.SimpleGraphs.AbstractSimpleGraph) at /home/renatogeh/.julia/packages/LightGraphs/IgJif/src/SimpleGraphs/SimpleGraphs.jl:58
vertices(::LightGraphs.AbstractGraph) at /home/renatogeh/.julia/packages/LightGraphs/IgJif/src/interface.jl:181
Stacktrace:
[1] plot(g::SimpleDiGraph{Int64}, layout::TikzGraphs.Layouts.Spring)
@ TikzGraphs ~/.julia/packages/TikzGraphs/tob6G/src/TikzGraphs.jl:44
[2] top-level scope
@ REPL[2]:1
What's weird about this is that vertices
is calling LightGraphs
, and not Graphs.jl
. After some digging around, I found out that the latest version (v1.2.0) of TikzGraphs is not yet synced with the latest docs.
An easy fix would be to simply send out a v1.2.1 patch so that we get the updated Project.toml
, fixing this issue. This way new users won't get confused for not getting the most basic example running in their machines. What do you think?
Thanks
Is there any easy way to do this with TikzGraphs graphs?
I am trying to draw a syntax tree where different nodes have the same label.
Those nodes seem to get amalgamated into one.
The URL of this package does not match that stored in METADATA.jl.
cc: @Shushman
Currently, the keyword options is for begin{tikzpiture}[options...]. It should be useful to allow set options for \graph [options]. For example, we can set the common styles for nodes and edges here. This is also they how TikzGraphs set the options for layout.
Even with
dev TikzPictures
dev TikzGraphs
Jupyter code:
using TikzGraphs
using LightGraphs
g = DiGraph(4)
add_edge!(g, 1, 2)
add_edge!(g, 2, 3)
TikzGraphs.plot(g)
using TikzGraphs
using LightGraphs
g = DiGraph(4)
add_edge!(g, 1, 2)
add_edge!(g, 2, 3)
TikzGraphs.plot(g)
Error message:
MethodError: no method matching replace(::String, ::String, ::String)
Closest candidates are:
replace(::String, !Matched::Pair{#s55,B} where B where #s55<:AbstractChar; count) at strings/util.jl:414
replace(::String, !Matched::Pair{#s52,B} where B where #s52<:Union{Tuple{Vararg{AbstractChar,N} where N}, Set{#s49} where #s49<:AbstractChar, AbstractArray{#s50,1} where #s50<:AbstractChar}; count) at strings/util.jl:419
replace(::String, !Matched::Pair; count) at strings/util.jl:423
...
Stacktrace:
[1] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at /home/wangnan/store/workspace/julia/TikzPictures/src/TikzPictures.jl:327
[2] limitstringmime(::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at /home/wangnan/.julia/packages/IJulia/iMVN2/src/inline.jl:36
[3] display_dict(::TikzPictures.TikzPicture) at /home/wangnan/.julia/packages/IJulia/iMVN2/src/execute_request.jl:38
[4] #invokelatest#1 at ./essentials.jl:686 [inlined]
[5] invokelatest at ./essentials.jl:685 [inlined]
[6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/wangnan/.julia/packages/IJulia/iMVN2/src/execute_request.jl:207
[7] #invokelatest#1 at ./essentials.jl:686 [inlined]
[8] invokelatest at ./essentials.jl:685 [inlined]
[9] eventloop(::ZMQ.Socket) at /home/wangnan/.julia/packages/IJulia/iMVN2/src/eventloop.jl:8
[10] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:259
Hi. It would be nice to have the functionality to include a dictionary containing the x and y coordinates of the nodes such that they can be placed as desired. Thanks!
When I am trying to run the example code
using TikzGraphs
using LightGraphs
g = DiGraph(4)
add_edge!(g, 1, 2)
add_edge!(g, 2, 3)
TikzGraphs.plot(g)
in a Jupyter notebook, I met the following error:
SystemError: mktempdir: Permission denied
Stacktrace:
[1] #systemerror#39(::Nothing, ::Function, ::Symbol, ::Bool) at ./error.jl:106
[2] systemerror at ./error.jl:106 [inlined]
[3] mktempdir(::String) at ./file.jl:501
[4] _mktempdir at /Users/qz/.julia/packages/TikzPictures/b9irC/src/TikzPictures.jl:195 [inlined]
[5] save(::TikzPictures.SVG, ::TikzPictures.TikzPicture) at /Users/qz/.julia/packages/TikzPictures/b9irC/src/TikzPictures.jl:354
[6] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at /Users/qz/.julia/packages/TikzPictures/b9irC/src/TikzPictures.jl:441
[7] limitstringmime at /Users/qz/.julia/packages/IJulia/4VL8h/src/inline.jl:36 [inlined]
[8] display_dict(::TikzPictures.TikzPicture) at /Users/qz/.julia/packages/IJulia/4VL8h/src/execute_request.jl:39
[9] #invokelatest#1 at ./essentials.jl:686 [inlined]
[10] invokelatest at ./essentials.jl:685 [inlined]
[11] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /Users/qz/.julia/packages/IJulia/4VL8h/src/execute_request.jl:197
[12] #invokelatest#1 at ./essentials.jl:686 [inlined]
[13] invokelatest at ./essentials.jl:685 [inlined]
[14] eventloop(::ZMQ.Socket) at /Users/qz/.julia/packages/IJulia/4VL8h/src/eventloop.jl:8
[15] (::getfield(IJulia, Symbol("##12#15")))() at ./task.jl:259
However, I can execute mktempdir
directly in Julia:
julia> mktempdir()
"/var/folders/hx/79tr9k0x27b_z93pl1pyspbw0000gn/T/tmpF5waul"
My system is
System Version: macOS 10.13.6 (17G2307)
Kernel Version: Darwin 17.7.0
My Julia version is 1.0.0
, the deps are: TikzGraphs v1.0.0
, and LightGraphs v1.1.0
. My MacTeX version is 2018.0417
.
I was following https://github.com/sisl/BayesNets.jl/blob/master/doc/BayesNets.ipynb (great tutorial btw) and ran into trouble getting the figures running.
I needed texlive-luatex
, texlive-pictures
, and texlive-xetex
to get the figures generated. Just leaving this here in case anyone else finds it useful.
I got this error trying to use TikzGraphs, not sure how to remedy it.
Error saving as SVG
could not spawn lualatex --enable-write18 --output-directory=. tikzpicture
: no such file or directory (ENOENT)
This is my code:
using LightGraphs
using TikzGraphs
g = Grid([5,5])
TikzGraphs.plot(g)
Hello,
Is it possible to draw a node with a self loop? How would one proceed?
I tried the following:
using LightGraphs
g = SimpleDiGraph(2)
add_edge!(g, (2, 1))
add_edge!(g, (1,1))
TikzGraphs.plot(g, node_styles=Dict(1=>"loop below"))
The arrow corresponding to the edge (1,1) seems to be there but is poorly formatted.
Hi all,
LightGraphs is preparing for a fairly large upgrade with Julia 0.6, and I wanted to make you aware of what we're doing. Very few things are breaking, but there will be some potential performance improvements that you might be able to take advantage of.
In a nutshell: we're abstracting Graph
and DiGraph
, renaming them to SimpleGraph
and SimpleDiGraph
*, and parameterizing vertex indices to <: Integer
. This will allow you to create, e.g., SimpleGraph{UInt8}
s that will be much more space-efficient if you have graphs that are < 256 vertices.
*While we plan on more abstractions (e.g., for weighted graphs) in the future, for now Graph
and DiGraph
will continue to work and will continue to default to SimpleGraph
, and the default parameterization for both Simple(Di)Graph
s and (Di)Graph
s will be Int
.
Feel free to review the (very long) WIP at sbromberger/LightGraphs.jl#541 - your feedback would be greatly appreciated.
Hi,
I just discovered this really cool package!
I was wondering if there were any plan to support the phylogenetic tree layout?
Thanks!
Need to figure out why it is failing on travis. It seems to work on the Ubuntu, Windows, and MacOS machines in our lab.
Sorry if this is not relevant to your use of LightGraphs, but I wanted to make sure you’re aware of a change in the API for the induced_subgraph()
function.
Starting in LightGraphs 0.7.1, induced_subgraph()
will, in addition to the subgraph itself, return a mapping of the original vertex indices to the new ones. This will require code changes to ignore the new return value if you’re using this function.
If you’re using the getindex
version of induced_subgraph
(that is, g[1:5]
), there will be no change.
Feel free to close this out if it’s not applicable to your use of LightGraphs. Thanks!
Hello,
I am trying to draw a simple FFNN and a simple RNN.
In order to show the input layer of the FFNN how can I insert edges that are directed to nodes? And for the RNN part is it possible to draw reflexive edges ?
B.R.
It seems the background of a graph figure is transparent. Therefore, it is nearly invisible in the dark-mode Pluto cell.
Hello,
I just installed the package and I get an eror when Trying to run
using TikzGraphs
g = DiGraph(4)
add_edge!(g, 1, 2)
add_edge!(g, 2, 3)
TikzGraphs.plot(g)
I get
! Package pgfkeys Error: I do not know the key '/tikz/hyper/.forward to' and I
am going to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.71 ...appendtoforwardinglist{/tikz/,/tikz/graphs/}
Error saving as SVG
LaTeX error
The error suggests Latex problems. Nevertheless I use LaTeX regularly.
My Latex info:
pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0
My system is running an ubuntu with the following details:
Pkg.versioninfo()
Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
I would appreciate any hint to solve this.
Thank you
brew install pdf2svg
for mac users.The most recent version of PGF on texlive 2018 leads to this failure:
! Package pgf Error: Graph drawing library 'layered' not found.
See the pgf package documentation for explanation.
Type H <return> for immediate help.
...
l.7 \usegdlibrary{layered}
LaTeX error
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] save(::TikzPictures.SVG, ::TikzPictures.TikzPicture) at C:\Users\Mykel\.julia\packages\TikzPictures\b9irC\src\TikzPictures.jl:387
[3] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at C:\Users\Mykel\.julia\packages\TikzPictures\b9irC\src\TikzPictures.jl:441
[4] limitstringmime at C:\Users\Mykel\.julia\packages\IJulia\0cLgR\src\inline.jl:36 [inlined]
[5] display_mimestring(::MIME{Symbol("image/svg+xml")}, ::TikzPictures.TikzPicture) at C:\Users\Mykel\.julia\packages\IJulia\0cLgR\src\execute_request.jl:73
[6] display_dict(::TikzPictures.TikzPicture) at C:\Users\Mykel\.julia\packages\IJulia\0cLgR\src\execute_request.jl:101
[7] #invokelatest#1 at .\essentials.jl:686 [inlined]
[8] invokelatest at .\essentials.jl:685 [inlined]
[9] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\Mykel\.julia\packages\IJulia\0cLgR\src\execute_request.jl:256
[10] #invokelatest#1 at .\essentials.jl:686 [inlined]
[11] invokelatest at .\essentials.jl:685 [inlined]
[12] eventloop(::ZMQ.Socket) at C:\Users\Mykel\.julia\packages\IJulia\0cLgR\src\eventloop.jl:8
[13] (::getfield(IJulia, Symbol("##12#15")))() at .\task.jl:259
Lualatex takes ~20 min to install when running a travis test.
It then fails with lualatex -v
not being able to run.
I have a relative big tree graph but not overly complicated (around 75 nodes).
A tree is always a planar graph, so it should be able to be plotted without crossing edges.
Is there a trick to make it look like a normal tree graph?
With BayesNets.jl no longer using Graphs.jl (it uses LightGraphs.jl instead) and Graphs.jl becoming unmaintained (see discussion), it seems like we should just drop support for Graphs.jl.
Error message upon building:
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: MethodError: no method matching haskey(::Nothing, ::String)
Closest candidates are:
haskey(::Base.Iterators.Pairs, ::Any) at iterators.jl:247
haskey(::Dict, ::Any) at dict.jl:546
haskey(::Base.ImmutableDict, ::Any) at dict.jl:731
...
Stacktrace:
[1] _get_deps!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:396
[2] #build#55(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:434
[3] build at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:411 [inlined]
[4] do_build!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:601
[5] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:686
[6] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:685
[7] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:542
[8] #do_cmd#30(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:507
[9] do_cmd at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:503 [inlined]
[10] (::getfield(Pkg.REPLMode, Symbol("##41#44")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:842
[11] #invokelatest#1 at ./essentials.jl:686 [inlined]
[12] invokelatest at ./essentials.jl:685 [inlined]
[13] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
[14] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
[15] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
[16] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
[17] #invokelatest#1 at ./essentials.jl:686 [inlined]
[18] invokelatest at ./essentials.jl:685 [inlined]
[19] macro expansion at ./logging.jl:308 [inlined]
[20] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
[21] exec_options(::Base.JLOptions) at ./client.jl:242
[22] _start() at ./client.jl:421
Non-unique labels no not result in the correct graph:
g = DiGraph(3)
add_edge!(g, 1, 2)
add_edge!(g, 1, 3)
TikzGraphs.plot(g, ["+", "a", "a"])
This can certainly be bypassed with pure Tikz; not sure whether the graphs package would support something like this. We could throw a warning if it cannot be solved.
PDFPlots works but TikzGraphs doesn't; I get this inscrutable error message.
using LightGraphs
g = DiGraph(4)
add_edge!(g, 1, 2)
add_edge!(g, 2, 3)
TikzGraphs.plot(g)
! Undefined control sequence.
l.1793 \__msg_kernel_new:nnnn
{ xparse } { bad-arg-spec }
Error saving as SVG
LaTeX error
Hi,
I'm trying to use the package to visualize some graphs using the Julia REPL in VSCode. I tried running the simple example in the docs and got the following error:
julia> using TikzGraphs
julia> using LightGraphs
julia> g = DiGraph(4)
{4, 0} directed simple Int64 graph
julia> add_edge!(g, 1, 2)
true
julia> add_edge!(g, 2, 3)
true
julia> TikzGraphs.plot(g)
Error showing value of type TikzPictures.TikzPicture:
ERROR: IOError: could not spawn `lualatex --enable-write18 --output-directory=./jl_sKcDvq ./jl_sKcDvq/tikzpicture.tex`: no such file or directory (ENOENT)
Stacktrace:
[1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
@ Base .\process.jl:99
[2] #637
@ .\process.jl:112 [inlined]
[3] setup_stdios(f::Base.var"#637#638"{Cmd}, stdios::Vector{Any})
@ Base .\process.jl:196
[4] _spawn
@ .\process.jl:111 [inlined]
[5] _spawn
@ .\process.jl:106 [inlined]
[6] success(cmd::Cmd)
@ Base .\process.jl:496
[7] _mkTempPdf(tp::TikzPictures.TikzPicture, temp_dir::String, temp_filename::String; dvi::Bool)
@ TikzPictures C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\svg.jl:82
[8] _mkTempPdf
@ C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\svg.jl:74 [inlined]
[9] _mkTempSvg(backend::TikzPictures.PopplerBackend, tp::TikzPictures.TikzPicture, temp_dir::String, temp_filename::String)
@ TikzPictures C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\svg.jl:37
[10] _mkTempSvg(tp::TikzPictures.TikzPicture, temp_dir::String, temp_filename::String)
@ TikzPictures C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\svg.jl:51
[11] (::TikzPictures.var"#21#22"{TikzPictures.TikzPicture, String})()
@ TikzPictures C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\TikzPictures.jl:368
[12] cd(f::TikzPictures.var"#21#22"{TikzPictures.TikzPicture, String}, dir::String)
@ Base.Filesystem .\file.jl:95
[13] save(f::TikzPictures.SVG, tp::TikzPictures.TikzPicture)
@ TikzPictures C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\TikzPictures.jl:361
[14] show(f::IOBuffer, #unused#::MIME{Symbol("image/svg+xml")}, tp::TikzPictures.TikzPicture)
@ TikzPictures C:\Users\UB01382\.julia\packages\TikzPictures\nU7Cj\src\TikzPictures.jl:396
[15] display(d::VSCodeServer.InlineDisplay, m::MIME{Symbol("image/svg+xml")}, x::TikzPictures.TikzPicture)
@ VSCodeServer c:\Users\UB01382\.vscode\extensions\julialang.language-julia-1.2.7\scripts\packages\VSCodeServer\src\display.jl:0
[16] display(d::VSCodeServer.InlineDisplay, mime::String, x::Any)
@ Base.Multimedia .\multimedia.jl:216
[17] display(d::VSCodeServer.InlineDisplay, x::TikzPictures.TikzPicture)
@ VSCodeServer c:\Users\UB01382\.vscode\extensions\julialang.language-julia-1.2.7\scripts\packages\VSCodeServer\src\display.jl:108
[18] display(x::Any)
@ Base.Multimedia .\multimedia.jl:328
[19] #invokelatest#2
@ .\essentials.jl:708 [inlined]
[20] invokelatest
@ .\essentials.jl:706 [inlined]
[21] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:247
[22] (::REPL.var"#40#41"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:231
[23] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:462
[24] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:229
[25] (::REPL.var"#do_respond#61"{Bool, Bool, REPL.var"#72#82"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
@ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:798
[26] #invokelatest#2
@ .\essentials.jl:708 [inlined]
[27] invokelatest
@ .\essentials.jl:706 [inlined]
[28] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
[29] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126 [30] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL .\task.jl:411
However, I can run this inside a Julia terminal.
Any idea why this is happening?
Julia v1.6.1
TikzGraphs v1.1.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.