Drawing and serializing graphs
暂无分享,去创建一个
Graphs tend to be inherently complex and correspondingly challenging to represent visually. Sometimes the process of analyzing a graph involves an ad hoc pipeline of tools and techniques. This necessitates that there be a way to represent the data that constitutes a graph in a standard format suitable for interchange between tools. As with RDF, there are a number of serialization formats for graph data. In this chapter, we will explore two topics. First, the general task of representing the data that describes nodes and edges without regard to any specific layout. Serializations may differ in syntax, but in essence they are just lists of nodes and some means to indicate whether, and in what direction, an edge exists between them. XML and JSON figure prominently among graph serialization formats. The remainder of this chapter is concerned with graph drawing and graph visualization tools. Graph serializations encode the model and its data. By itself, this data is incomprehensible to a human. But a human can make sense of a visualization of a graph. A graph can be drawn in many ways: a lattice, hierarchically, a random tangle, spread out according to rules that mimic gravity or magnetic attraction, fanned out in a circle, or represented in a 3D model that you could spin and fly around in. Interactivity, graph analytics, and the ability to filter nodes and edges play an important role in comprehending a visualization of a graph.