Skip to main content

DimFlux: Force-Directed Doubly-Additive Line Diagrams

This repository implements a force-directed placement approach for doubly-additive line drawings.

References

This project is based on the theory and methods described in the following works.

Primary Reference

@article{Noehre2026,
  title = {DimFlux: Force-directed additive line diagrams},
  journal = {International Journal of Approximate Reasoning},
  volume = {197},
  pages = {109734},
  year = {2026},
  issn = {0888-613X},
  doi = {https://doi.org/10.1016/j.ijar.2026.109734},
  url = {https://www.sciencedirect.com/science/article/pii/S0888613X2600109X},
  author = {Marcel Nöhre and Dominik Dürrschnabel and Bernhard Ganter and Gerd Stumme},
  keywords = {Formal concept analysis, Force-directed placement, Additive line diagrams, DimDraw, DimFlux},
  abstract = {The visualization of concept lattices is a central problem in the field of Formal Concept Analysis. Force-directed algorithms, as popular in graph drawing, are a promising approach, treating lattice diagrams as physical models, optimizing node positions based on forces derived from the lattice structure. We build on the work of Zschalig, who, however, limited himself to attribute-additive diagrams. We use a more general additivity, in which both the attributes and the objects contribute to the positions of the concept nodes. We replace the planarity enhancer used by Zschalig to obtain a starting diagram for force-directed optimization with the DimDraw algorithm, which generates structured order diagrams on its own. The combination results in DimFlux, an algorithm that leverages the advantages of DimDraw but generates additive diagrams in which readability is increased by maximizing the conflict distance between nodes and non-incident edges.}
}

Supplementary Material

@misc{Noehre2026Supplementary,
  author = {Nöhre, Marcel and Dürrschnabel, Dominik and Ganter, Bernhard and Stumme, Gerd},
  title = {A Visual Benchmark of DimFlux: Comparison of Line Diagrams for Concept Lattices},
  month = mar,
  year = 2026,
  publisher = {Zenodo},
  doi = {10.5281/zenodo.18936106},
  url = {https://doi.org/10.5281/zenodo.18936106}
}

If you use this code in your work, please cite the above references.

Usage

Install via PyPI

Install the package from PyPI using pip.

pip install dim-flux

Execute the layout generation using the dim-flux command.

dim-flux

Install from source

Clone the repository and initialize the environment. uv will automatically create a virtual environment and sync dependencies based on the pyproject.toml. uv will automatically create a virtual environment.

uv sync

Execute the layout generation using uv run to ensure the correct environment context.

uv run dim-flux

The script will prompt you for a path to a .cxt file. To export the node positions add the --export flag.

uv run dim-flux --export

The --export flag also works with the PyPI install:

dim-flux --export

Use as a library

DimFlux can also be called directly from Python via dim_flux.plot.

from dim_flux import plot

# cxt can be a path to a .cxt file, or a pandas DataFrame representing the incidence matrix
positions = plot('path/to/context.cxt')

By default plot returns the computed (x, y) coordinates in lectic order as a numpy array. Pass export=True to instead write the PDF, GraphML and .pos exports to disk.

plot('path/to/context.cxt', export=True)

Configuration

Category Parameter Description
Drawings plot_si_graph Visualize the Supremum-Infimum graph ($f_{max}$ is highlighted)
plot_initial_layout Visualize the initial layout of the concept lattice
plot_optimized_layout Visualize the final optimized layout of the concept lattice
Annotations si_graph_annotations Display annotations in the SI-Graph
initial_layout_annotations Display annotations in the initial drawing
optimized_layout_annotations Display annotations in the final optimized drawing
Forces plot_individual_forces Display force vectors for objects and attributes respectively
plot_combined_forces Display combined force vectors
plot_gradients Display gradient vectors at concepts
Dev plot_origin Display the origin $(0,0)$

License

Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dim_flux-1.0.6.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dim_flux-1.0.6-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file dim_flux-1.0.6.tar.gz.

File metadata

  • Download URL: dim_flux-1.0.6.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dim_flux-1.0.6.tar.gz
Algorithm Hash digest
SHA256 1d49ce1c77f15f4aff7c9748d0bc32465bb0a6e5efab062568c92a4b1a1baecc
MD5 bdbaa856780271b33d715bc9c0be699b
BLAKE2b-256 bf5d043d71ac68c5c06b80a02916e14ac75e98ee5e39bbd2e0f5a452649bbecf

See more details on using hashes here.

File details

Details for the file dim_flux-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: dim_flux-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dim_flux-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b62421e70085891aee75b505095895f90fb429350bf4ac1c5bf88b8c611649d6
MD5 c8e789fab15845c45cd3b7dcfb37ee5f
BLAKE2b-256 5c0f666a997674b6a5d64a6c7f2b7e978fbfb206d3c47fdc298e3c7584848a96

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.8

2 files

1.0.7

2 files

This release

1.0.6 This release

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page