Linux Applications

How to use KGraphEditor on Linux

Graphs are a great way for visualizing, interpreting, and understanding data that would otherwise seem like a random group of numbers with no relation whatsoever. They allow you to find correlations between variables, predict values for unknown quantities, and present data in an easy-to-understand manner.

If you’re someone working in any STEM field, chances are you encounter these graphs almost daily. Advancements in the field of programming have allowed us to implement these graphs in the form of sophisticated data structures.

One of the most widely used graph description languages is DOT. DOT allows you to show relationships between different variables/objects easily to interpret.

Essentially, you would require a file viewer and editor to work with these .dot files. Fortunately, we have just the application for you.

The KGraphViewer

One of the best available options for viewing files of the DOT format is the KGraphViewer.

For those of you who don’t know, the KGraphViewer is an application that was developed by KDE. It is essentially a tool that is used for files of the .gv and .dot type, both of which correspond to the DOT file extension.

KGraphViewer also had a test version of an editor known as KGraphEditor. However, it was removed later on due to functionality issues.

Nevertheless, KGraphViewer is a tool you would want to have on your system.

This guide is meant to help you learn how to use KGraphViewer on your system. We will cover the installation process and a general tutorial on how to get started. Additionally, we will provide some alternatives for KGraphEditor that should get the job done.

Let’s take a look at the steps.

Method 1: Installing KGraphViewer Using $apt install

The process of installing KgraphViewer on your system is fast and simple. It will make use of the Command Terminal.

There are essentially two methods that you can use to install KGraphViewer. The first method makes use of the $ install command. The second method shall make use of the Snap store.

It should be noted that we’ll be using Ubuntu 20.04 LTS for this guide. If you’re on a previous version or a completely different Linux distribution, the installation method shouldn’t differ except for the syntax of the commands.

Follow the steps below to install KGraphViewer using the $ install command.

First and foremost, begin by opening the Command Terminal on your system. For most Linux distributions, pressing Ctrl + Alt + T on your keyboard should open it. Alternatively, you can also open the Terminal by typing ‘Terminal’ in the search bar.

Once the Terminal is open, type the command below to update all existing packages and repositories:

$ sudo apt update

If you’re on CentOS, type the following:

$ sudo yum update

Once the update is finished, you can proceed to the installation.

To install KGraphViewer, type the following in the Command Terminal:

$ sudo apt-get install kgraphviewer

Arch Linux users can type the following in the Command Terminal:

$ pacman -S kgraphviewer

Users of Fedora will have the following syntax for the same command:

$ dnf install kgraphviewer

Once you have executed the command in the Terminal, all that’s left is to wait for the installation to finish. Once that’s done, you’re good to go.

Method 2: Installing KGraphViewer Using Snap

If the previous method doesn’t work out for you, you can install KGraphViewer using the Snap store. To achieve this, make sure that Snap is available on your system. To install snap, use the following command:

$ sudo apt install snapd

This will install snap on your system. If it’s already available, then you can move on to installing KGraphViewer.

To install KGraphViewer on your system, type the following in the Command Terminal:

$ sudo snap install kgraphviewer –candidate

Wait for the installation to finish. If you followed the steps correctly, then you should have KGraphViewer installed on your system. All that’s left now is to learn how to use it.

Features of the KGraphViewer

With the installation complete, it’s a good idea to get acquainted with the intricacies of the KGraphViewer.

Upon opening the KGraphViewer for the first time, you should see a window similar to the one in the image below.

Click on File 🡪 Open and select the DOT file you wish to inspect.

There are a lot of features that are associated with the KGraphViewer. Discussing all of them isn’t possible in the span of a starter guide. However, if you wish to learn more about KGraphViewer, you can get a full list of information in their official user manual.

Here is a list of features that come with the latest KGraphViewer.

  • Ability to zoom into graphs without losing any details/pixels
  • Recent files list with saving features
  • Option to print the results
  • Automatic selection between dot and neato for appropriate graphs
  • Ability to choose between different colored backgrounds
  • Built-in Help and User Manual

Alternatives to the KGraphEditor

As stated earlier, the KGraphEditor was an experimental feature that was supposed to be an alternative to DOT editors of its time. However, it was discontinued after being unable to perform as needed.

Nevertheless, there are many alternative applications that you can use to edit DOT files. A list of these apps is given below:

  • DotEditor is currently one of the best DOT file Editors out there. Like KGraphEditor, the goal of DotEditor was to create a user-friendly, GUI-based file editor, allowing the users to edit the contents using the GUI tools.
  • yEd Graph Editor is another alternative similar to the aforementioned KGraphEditor. The editor can be used to make graphs and import data from external sources for the sake of analysis.
  • Graphviz is another application that’s right for the job. Being the core company behind the graph files, Graphviz has all the necessary tools that you’d require from an editor.

Conclusion

This concludes our guide on the KGraphEditor. Although KGraphEditor is not readily available anymore, the KGraphViewer is still a handy tool if paired with another editor. With this, we wish you all the best in your journey to master these tools.

About the author

Zeeman Memon

Hi there! I'm a Software Engineer who loves to write about tech. You can reach out to me on LinkedIn.