Function Repository Resource:

WolframPhysicsProjectStyleData

Source Notebook

Look up styles used in the Wolfram Physics Project

Contributed by: Wolfram Research

ResourceFunction["WolframPhysicsProjectStyleData"][]

yields an association describing default styles used in the Wolfram Physics Project.

ResourceFunction["WolframPhysicsProjectStyleData"][theme]

gives styles for a particular theme.

ResourceFunction["WolframPhysicsProjectStyleData"][t]

gives styles for a particular plot type t.

ResourceFunction["WolframPhysicsProjectStyleData"][t,e]

gives a value for a particular style element e of plot type t.

ResourceFunction["WolframPhysicsProjectStyleData"][theme,t,e]

gives a value for an element e of plot type t for theme.

Details

In ResourceFunction["WolframPhysicsProjectStyleData"][theme], the only theme supported right now is "Light".
In ResourceFunction["WolframPhysicsProjectStyleData"][t], possible values for t include:
"BranchialGraph"styles of branchial graph properties in MultiwaySystem
"CausalGraph"styles of causal graph properties in WolframModel and MultiwaySystem
"EvolutionCausalGraph"styles of evolution causal graph properties in MultiwaySystem
"EvolutionObject"icon of WolframModelEvolutionObject
"ExpressionsEventsGraph"styles of the expressions-events graph property in WolframModel
"GenericGraph"styles for binary graphs in network substitution systems
"GenericLinePlot"styles for line plots in the Wolfram Physics Project
"Rule"styles used in RulePlot of WolframModel
"RulialGraph"styles for branchial graphs of the rule-space multiway system
"SpatialGraph"styles used in WolframModelPlot
"SpatialGraph3D"styles for 3D plots of spatial hypergraphs
"StatesGraph"styles of states graph properties in MultiwaySystem
"StatesGraph3D"styles for 3D plots of MultiwaySystem state graphs
In ResourceFunction["WolframPhysicsProjectStyleData"][t, e], possible values for e correspond to keys in ResourceFunction["WolframPhysicsProjectStyleData"][t]. Some common examples include:
"Options"list of options for the relevant plotting function
"Function"function that can be applied to a Graph to convert it to the requested style
"VertexStyle"VertexStyle for a particular Graph type
"EdgeStyle"EdgeStyle for a particular Graph type
Install the SetReplace paclet to get syntax autocompletion, better performance and bleeding-edge functionality.

Examples

Basic Examples (2) 

Get all causal graph styles:

In[1]:=
ResourceFunction["WolframPhysicsProjectStyleData"]["CausalGraph"]
Out[1]=

Retrieve a function for restyling a Graph and apply it to a random graph:

In[2]:=
ResourceFunction["WolframPhysicsProjectStyleData"]["SpatialGraph", "Function"]@RandomGraph[{30, 40}]
Out[2]=

Scope (3) 

Get all the types used in the Wolfram Physics Project:

In[3]:=
ResourceFunction["WolframPhysicsProjectStyleData"][] // Keys
Out[3]=

Get a style used for polygons in WolframModelPlot:

In[4]:=
ResourceFunction[
 "WolframPhysicsProjectStyleData"]["SpatialGraph", "EdgePolygonStyle"]
Out[4]=

Specify a theme explicitly (only "Light" is currently supported):

In[5]:=
ResourceFunction[
 "WolframPhysicsProjectStyleData"]["Light", "SpatialGraph3D", "VertexStyle"]
Out[5]=

Properties and Relations (5) 

Spatial graph styles are used in the resource function WolframModelPlot:

In[6]:=
ResourceFunction["WolframPhysicsProjectStyleData"][
  "SpatialGraph"] /@ {"VertexStyle", "EdgeLineStyle", "EdgePolygonStyle"}
Out[6]=
In[7]:=
ResourceFunction["WolframModelPlot"][{{1, 2, 3}, {3, 4, 5}}]
Out[7]=

Rule styles are used in RulePlot for the resource function WolframModel:

In[8]:=
ResourceFunction[
 "WolframPhysicsProjectStyleData"]["Rule", "SharedElementHighlight"]
Out[8]=
In[9]:=
RulePlot[
 ResourceFunction[
   "WolframModel"][{{1, 2}} -> {{1, 3}, {1, 3}, {3, 2}}]]
Out[9]=

Causal graph styles are used in the "CausalGraph" and "LayeredCausalGraph" properties of the resource function WolframModel:

In[10]:=
ResourceFunction["WolframPhysicsProjectStyleData"]["CausalGraph"]
Out[10]=
In[11]:=
ResourceFunction[
  "WolframModel"][{{1, 2}, {3, 2}} -> {{4, 1}, {4, 2}, {1, 2}, {4, 3}}, Automatic, Automatic, "CausalGraph", "IncludeBoundaryEvents" -> "Initial"]
Out[11]=

States graph and branchial graph styles are used in the "StatesGraph" and "BranchialGraph" properties of the resource function MultiwaySystem:

In[12]:=
ResourceFunction[
 "WolframPhysicsProjectStyleData"] /@ {"StatesGraph", "BranchialGraph"}
Out[12]=
In[13]:=
ResourceFunction["MultiwaySystem"][
   "WolframModel" -> {{{1, 2}, {3, 2}} -> {{4, 1}, {4, 2}, {1, 2}, {4,
         3}}}, {{{1, 1}, {1, 1}}}, 3, #, GraphLayout -> "SpringElectricalEmbedding"] & /@ {"StatesGraphStructure", "BranchialGraphStructure"}
Out[13]=

Token and event styles are used in the ResourceFunction["TokenEventGraph"]:

In[14]:=
ResourceFunction["WolframPhysicsProjectStyleData"]["TokenEventGraph"]
Out[14]=
In[15]:=
ResourceFunction["TokenEventGraph"][{n_ :> n + 1, n_ :> 2 n}, {1, 2},
  2]
Out[15]=

Version History

  • 8.1.0 – 04 November 2022
  • 8.0.0 – 13 December 2021
  • 7.1.0 – 04 March 2021
  • 7.0.0 – 17 August 2020
  • 6.0.0 – 23 June 2020
  • 5.0.0 – 14 April 2020
  • 4.0.0 – 07 April 2020
  • 3.0.0 – 20 March 2020
  • 2.0.0 – 10 March 2020
  • 1.0.0 – 27 February 2020

Related Resources

License Information