QuEraComputing / UnitDiskMapping.jl

Reduce several arbitrary-connectivity optimization problems into maximum independent set problems on a grid
https://github.com/QuEraComputing/UnitDiskMapping.jl
Other
16 stars 3 forks source link

Write a submodule to generate Tikz pictures #7

Closed GiggleLiu closed 2 years ago

GiggleLiu commented 2 years ago

I wish it can be automatically done in a submodule, so that we can render graphs used in paper easier.

minhthin1028 commented 2 years ago

What is your vision for this submodule/how is it different from visgadget/visgrid? @GiggleLiu

GiggleLiu commented 2 years ago

Like

# canvas
canvas = ...

# add node
node_list = []
for i=1:10
     push!(node_list, node(canvas, location...))
end

# add edge
for (i, j) in [...]
    connect!(canvas, node_list, i, j)
end

render_tikz(filename, canvas, extra_command...)

It should be a "programmable - graph oriented - but also general purposed - tikz generator".

GiggleLiu commented 2 years ago

About general purposed: I wish it is not only a function of generating a plot for specific unitdisk graph. Because then it will be hard to add annotations the plot. The goal is to generate all plots except the main figure in the paper.

GiggleLiu commented 2 years ago

If you are not sure how to start, I can sketch a draft for you. It should not take much time (like half an hour) for me to write a draft. Then you can polish/add more features based on that. This will save time for both of us.

minhthin1028 commented 2 years ago

I'm just putting together something basic right now with a few simple features:

  1. blank or dotted grid canvas
  2. draw nodes (w/attributes), edges, and graph network (with given layout locations)
  3. output all data on a "tikz_graph.tex" file that can be put into latex

and then we can discuss further what other features you want?