graphgephi_2.12

Basic conversion tool to visualize Graph4Scala graphs with the Gephi toolkit

License

License

Categories

Categories

Gephi General Purpose Libraries Utility
GroupId

GroupId

vision.id
ArtifactId

ArtifactId

graphgephi_2.12
Last Version

Last Version

0.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

graphgephi_2.12
Basic conversion tool to visualize Graph4Scala graphs with the Gephi toolkit
Project URL

Project URL

https://github.com/mcallisto/scala-graph-to-gephi
Source Code Management

Source Code Management

https://github.com/mcallisto/scala-graph-to-gephi

Download graphgephi_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/vision.id/graphgephi_2.12/ -->
<dependency>
    <groupId>vision.id</groupId>
    <artifactId>graphgephi_2.12</artifactId>
    <version>0.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/vision.id/graphgephi_2.12/
implementation 'vision.id:graphgephi_2.12:0.1.3'
// https://jarcasting.com/artifacts/vision.id/graphgephi_2.12/
implementation ("vision.id:graphgephi_2.12:0.1.3")
'vision.id:graphgephi_2.12:jar:0.1.3'
<dependency org="vision.id" name="graphgephi_2.12" rev="0.1.3">
  <artifact name="graphgephi_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='vision.id', module='graphgephi_2.12', version='0.1.3')
)
libraryDependencies += "vision.id" % "graphgephi_2.12" % "0.1.3"
[vision.id/graphgephi_2.12 "0.1.3"]

Dependencies

compile (7)

Group / Artifact Type Version
org.scala-graph : graph-core_2.12 jar 1.13.0
com.lihaoyi : os-lib_2.12 jar 0.2.8
org.gephi : gephi-toolkit jar 0.9.2
org.netbeans.modules : org-netbeans-core jar RELEASE90
org.netbeans.modules : org-netbeans-core-startup-base jar RELEASE90
org.netbeans.modules : org-netbeans-modules-masterfs jar RELEASE90
org.netbeans.api : org-openide-util-lookup jar RELEASE90

Project Modules

There are no modules declared in this project.

Build Status Maven Central Codacy Badge Codacy Badge Codecov badge

Graph4Scala graphs to Gephi images

Basic conversion tool to visualize Graph4Scala graphs with the Gephi toolkit.

Bridging two worlds

Graphs are seamless Scala collections thanks to the excellent Graph for Scala library by Peter Empen.

Sometimes is needed to quickly visualize them, for example for test purposes.

Gephi is an award-winning open-source platform for visualizing and manipulating large graphs, with a standalone toolkit.

How to

Use

Note that one resolver must be added and dependencies overridden to access the Gephi Toolkit sources.

From a Mill project

import mill._, scalalib._
import coursier.maven.MavenRepository

object foo extends ScalaModule {
  def repositories = super.repositories ++ Seq(
    MavenRepository("https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/")
  )

  def ivyDeps = Agg(
    ivy"vision.id::graphgephi:0.1.3",
    ivy"org.netbeans.modules:org-netbeans-core:RELEASE90",
    ivy"org.netbeans.modules:org-netbeans-core-startup-base:RELEASE90",
    ivy"org.netbeans.modules:org-netbeans-modules-masterfs:RELEASE90",
    ivy"org.netbeans.api:org-openide-util-lookup:RELEASE90"
  )
}

From an sbt project

resolvers ++= Seq(
  "gephi-thirdparty" at "https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/"
)

libraryDependencies ++= Seq(
  "org.gephi" % "gephi-toolkit" % "0.9.2" classifier "all",
  "vision.id" %% "graphgephi" % "0.1.3"
)

dependencyOverrides ++= Seq(
  "org.netbeans.modules" % "org-netbeans-core"              % "RELEASE90",
  "org.netbeans.modules" % "org-netbeans-core-startup-base" % "RELEASE90",
  "org.netbeans.modules" % "org-netbeans-modules-masterfs"  % "RELEASE90",
  "org.netbeans.api"     % "org-openide-util-lookup"        % "RELEASE90"
)

Draw a graph

Add the Drawable trait to your project and use the makeImage(g: Graph[N, E], path: String, name: String) method to draw a PNG raster image file or an SVG vectorial image file.

directed graph image Graph(1 ~> 2, 2 ~> 3, 3 ~> 4, 4 ~> 5, 5 ~> 1, 1 ~ 4, 6 ~> 4)

Test

The library can be built with

Mill

  1. Install Mill
  2. Open a terminal and cd to the repo directory
  3. Use the mill jvm.test command to run all tests
  4. Or use the mill jvm.test.one [testClassName] command to run a single test class

sbt

  1. Open a terminal and cd to the repo directory
  2. Use the sbt command to launch sbt
  3. Use the test command to run all tests
  4. Or use the testOnly vision.id.graphgephi.[testClassName] command to run a single test class

Versions

Version
0.1.3
0.1.2
0.1.1
0.1.0