Symbols and Functions > Utility Functions >
SetReplaceStyleData
allows one to lookup styles used in various SetReplace functions and properties such as
HypergraphPlot
and "CausalGraph"
.
For example, here is the default style used to draw polygons in HypergraphPlot
:
In[] := SetReplaceStyleData["SpatialGraph", "EdgePolygonStyle"]
The full specification is SetReplaceStyleData[theme, plot type, style element]
, however either the last or
the last two elements can be omitted to obtain a
full Association
of styles. The theme
argument can be
omitted to get the result for the default plot theme (only "Light"
theme is supported at the moment). Here are all
styles used in "CausalGraph"
for example:
In[] := SetReplaceStyleData["CausalGraph"]
This function is useful if one needs to produce "fake" example plots using styles consistent with SetReplace.
For graphs composed of only a single type of vertices and edges, there is a short-hand syntax. One can get the list of
all options that needs to be passed using an "Options"
property:
In[] := SetReplaceStyleData["SpatialGraph3D", "Options"]
Alternatively, one can use the "Function"
property, which would give a function that takes a graph and produces a
correctly styled graph:
In[] := SetReplaceStyleData["SpatialGraph3D", "Function"][
Graph3D[{1 -> 2, 2 -> 3, 3 -> 1, 3 -> 4, 4 -> 1}]]