# Format LightGraph / GraphPlot

**URL:** https://discourse.julialang.org/t/format-lightgraph-graphplot/54373
**Category:** Graphs
**Tags:** lightgraphs
**Created:** [February 1, 2021, 1:35pm UTC](https://discourse.julialang.org/t/format-lightgraph-graphplot/54373 "2021-02-01T13:35:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ZettEff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zetteff/32/31976_2.png) [@ZettEff](https://discourse.julialang.org/u/ZettEff)
#### Post date: [February 1, 2021, 1:35pm UTC](https://discourse.julialang.org/t/format-lightgraph-graphplot/54373/1 "2021-02-01T13:35:45Z")

</div>

Hi!

I am experimenting with `LightGraph` and `GraphPlot` packages.

Below code is a MWE which is working. So my issue is not that my below code has a bug.  
However, two things I cannot manage:

1. How can I ensure that the node labels are not cut off from the graph. I cannot manage that the label text is fully shown for each node.

2. How can I label the edges by passing in a matrix of same size as `m_adj` but filled with values?

```julia
using LightGraphs
using GraphPlot
using Random

label(n=12) = randstring(n)

n = 5
m_adj = randn(n,n) .>= 0
g = SimpleDiGraph(m_adj)
member = [1 for _ in 1:n]
member[1:3] .= 2
nodefillc = [colorant"lightseagreen", colorant"orange"][member]
labels = [label() for _ in 1:n]
gplot(g, 
      nodefillc=nodefillc, 
      nodelabel=labels,
      layout=circular_layout,
      linetype="curve")

```

Any hint will be helpful.

Thanks for your help!
