Basic Plotting
Learn how to create and customize chord diagrams.
Simple Plot
fig = Figure(size=(800, 800))
ax = Axis(fig[1,1], title="My Chord Diagram")
chordplot!(ax, cooc)
setup_chord_axis!(ax)
fig
Standalone Plot
You can also create a plot without explicitly creating an axis:
fig, ax, plt = chordplot(cooc)
setup_chord_axis!(ax)
figEssential Setup
Always call setup_chord_axis! after plotting to:
- Set equal aspect ratio
- Remove axis decorations
- Set appropriate limits
setup_chord_axis!(ax; padding=0.2) # padding controls margin around plotPlotting from DataFrame
You can plot directly from a DataFrame:
chordplot!(ax, df, [:V, :D, :J])This is equivalent to:
cooc = cooccurrence_matrix(df, [:V, :D, :J])
chordplot!(ax, cooc)