JuliaGraphs / GraphPlot.jl

Graph visualization for Julia.
http://JuliaGraphs.github.io/GraphPlot.jl/
Other
200 stars 62 forks source link

Vertex label clipping #191

Closed colbec closed 1 year ago

colbec commented 1 year ago

In Linux openSUSE Leap 15.4, using:

Julia Version 1.8.3
Commit 0434deb161e (2022-11-14 20:14 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, haswell)
  Threads: 1 on 4 virtual cores

labelclipping

I was pleasantly surprised to discover that GraphPlot would accept vectors as labels for vertices. However if the vectors are greater than about 5-6 elements then clipping occurs. In my sample image the clipping is minor; in some of my efforts to use slightly larger vectors quite large chunks are missing. Note for example the clipping on the red node label.

Is it possible that in calculating the overall size of the display area the possibility of long vertex labels is not fully taken into account?

colbec commented 1 year ago

Very similar to #161. Resolved somewhat by juggling distance param.

hdavid16 commented 1 year ago

@colbec, if you use my fork of the package you can specify a padding value to add a margin so the text is not clipped. This is in PR #186.