Skip to content

Commit

Permalink
upgrade LuxorGraphPlot (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu authored Jun 25, 2023
1 parent b65f85e commit 25c219d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/BloqadeLattices/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
LuxorGraphPlot = "0.1.4, 0.2"
LuxorGraphPlot = "0.2"
NearestNeighbors = "0.4"
StatsBase = "0.33, 0.34"
julia = "1.6"
Expand Down
7 changes: 4 additions & 3 deletions lib/BloqadeLattices/src/visualize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ function _viz_axes(; transform, xmin, xmax, ymin, ymax,
locs = [[coo(x, ymax+axes_y_offset) for x in xs]...,
[coo(xmin-axes_x_offset, y) for y in ys]...]
for (x, loc) in zip(xys, locs)
LuxorGraphPlot.draw_text(loc, "$(round(x; digits=2))$(axes_unit)"; color=axes_text_color, fontsize=axes_text_fontsize*unit/60)
LuxorGraphPlot.draw_text(loc, "$(round(x; digits=2))$(axes_unit)";
color=axes_text_color, fontsize=axes_text_fontsize*unit/60, fontface="")
end
end

Expand Down Expand Up @@ -238,7 +239,7 @@ function _viz_atoms(locs, edges, colors, vectors, texts, config)
xpad=config.xpad, ypad=config.ypad, xpad_right=config.xpad, ypad_bottom=config.ypad,
#vertex_stroke_opacity=config.blockade_fill_opacity,
unit=config.unit)
LuxorGraphPlot._show_graph(locs, Tuple{Int,Int}[], nothing, nothing, nothing, nothing, nothing, nothing, texts, blockadeconfig)
LuxorGraphPlot.unitless_show_graph(locs, Tuple{Int,Int}[], nothing, nothing, nothing, nothing, nothing, nothing, texts, blockadeconfig)
end

# show the arrows
Expand All @@ -253,7 +254,7 @@ function _viz_atoms(locs, edges, colors, vectors, texts, config)
vertex_text_color=config.node_text_color, fontsize=config.node_text_fontsize,
xpad=config.xpad, ypad=config.ypad, xpad_right=config.xpad, ypad_bottom=config.ypad,
edge_color=config.bond_color, edge_line_width=config.bond_linewidth, unit=config.unit)
LuxorGraphPlot._show_graph(locs, edges, colors, nothing, nothing, nothing, nothing, nothing, texts, graphconfig)
LuxorGraphPlot.unitless_show_graph(locs, edges, colors, nothing, nothing, nothing, nothing, nothing, texts, graphconfig)
end

struct ByDensity
Expand Down

0 comments on commit 25c219d

Please sign in to comment.