Hello everyone,
In the documentation of Plot/GraphRecipes (http://docs.juliaplots.org/latest/graphrecipes/examples/#graph_examples-1 ) you can find this example:
using GraphRecipes, Plots
g = [0 1 1;
0 0 1;
0 1 0]
graphplot(g, names=1:3, curvature_scalar=0.1)
Which is supposed to give this :
But when I run this code on my REPL I have only lines and not arrows and the names of the nodes are not displayed either.
Do you know why? Have there been any changes in the GraphRecipes package?
Thank you in advance for your answer ,
Valentine
oheil
June 29, 2020, 1:12pm
2
graphplot(g, names=1:3, curvature_scalar=0.1, arrow=0.4)
is doing the trick for me:
But I didn’t found a good starting point for reading some documentation, but I found it here:
opened 06:20PM - 10 May 16 UTC
closed 11:25PM - 19 Aug 16 UTC
I started to support native drawing of arrows. Create arrows similar to text, e… tc:
``` julia
# these are the same
plot(y, arrow = arrow())
plot(y, arrow = true)
plot(y, line = arrow())
plot(y, line = :arrow)
# these all set head length/width to 0.4
plot(y, arrow = 0.4)
plot(y, arrow = (0.4,0.4))
plot(y, arrow = arrow(0.4))
# these set length to 0.5, width to 0.2
plot(y, arrow = (0.5, 0.2))
plot(y, line = arrow(0.5, 0.2))
```
![tmp](https://cloud.githubusercontent.com/assets/933338/15156989/9aa217fa-16b7-11e6-8abf-572e40b6c1bc.png)
Under the hood: these apply to line/path (I'll support 3d in the future... only 2d for now). An arrow is drawn whenever there are 2 data points followed by an Inf/NaN, or if it's the last point. This means you can pass NaN-separated paths and arrows can be added to the ends of each segment.
I redid the quiver plot which is nicer and simpler. And streamplots (#178) should be much easier to generalize. (cc @goedman)
Okay thank you very much, i’ll look into it !