Category: imbSCI.Graph

imbSCI.Graph: Dia Diagram shape library support

Latest upgrade of imbSCI.Graph library (0.1.1.1) introduces support for Dia .shape and .sheet definitions. These classes are part of new namespace: imbSCI.Graph.DiagramLibraries.DiaShapes. Dia is legendary open source diagramming software – project web site with huge amount of free shape libraries. The library allows (for now) you to create, load, modify, save and export (SVG, JPG, PNG, TIFF…)…

Heat map generators (image, procedural) [imbSCI.Core 0.1.3.7 | imbSCI.Graph 0.1.0.30]

New versions of NuGet packages are released: imbSCI.Core 0.1.3.7 imbSCI.Graph 0.1.0.30 Among other new classes, now you have: image to heat map model converter framework for procedural heat map model conversion // namespaces relevant for the topic using imbSCI.Graph.Graphics.HeatMap; using imbSCI.Core.math.range.matrix; // namespaces used in examples below using Microsoft.VisualStudio.TestTools.UnitTesting; using imbSCI.Data.enums; using System.IO; using imbSCI.Core.files.folders;…

Creating DirectedGraph from Enum type

imbSCI.Graph library (0.1.0.28) is updated with few new classes, where enumToDGMLConverter is ready for use. enumToDGMLConverter will convert specified Enum type into directed graph that shows relationships between enum values, in respect to flags values. To use it add its namespace at top: using imbSCI.Graph.Converters.enumToGraph; // here we get the type to interpret Type enumType…

Example: Custom converter from graph tree (graphNodeCustom) to DGML

  /// <summary> /// Custom implementation of <see cref=”graphNodeCustom”/> to DGML converter /// </summary> /// <seealso cref=”imbSCI.Graph.Converters.graphToDirectedGraphConverterBase{imbSCI.Data.collection.graph.IGraphNode}” /> public class pipelineSubjectGraphConverter : graphToDirectedGraphConverterBase<pipelineTaskSubjectContentToken> { public pipelineSubjectGraphConverter() : base() { setup = new GraphStylerSettings(); setup.GraphDirection = imbSCI.Graph.DGML.enums.GraphDirectionEnum.LeftToRight; setup.GraphLayout = imbSCI.Graph.DGML.enums.GraphLayoutEnum.DependencyMatrix; setup.alphaMin = 0.7; setup.NodeGradient = new ColorGradient(“#FF195ac5”, “#FF195ac5”, ColorGradientFunction.AtoB | ColorGradientFunction.Hue | ColorGradientFunction.CircleCCW); setup.LinkGradient = new…

Example: Custom conversion from FreeGraph to DirectedGraph

Code example about customized FreeGraph conversion to DGML. using imbSCI.Graph.FreeGraph; using imbSCI.Graph.DGML; using imbSCI.Graph.DGML.core; imbSCI.Graph library is available via NuGet. /// <summary> /// Generates simple-styled graph /// </summary> /// <param name=”addLegend”>if set to <c>true</c> [add legend].</param> /// <returns></returns> public DirectedGraph GetSimpleGraph(Boolean addLegend=true) { DirectedGraph output = new DirectedGraph(); output.Title = name; output.Layout = imbSCI.Graph.DGML.enums.GraphLayoutEnum.Sugiyama; output.NeighborhoodDistance…