Properties

Properties

is an option that allows specification of properties to objects and items of objects.

Details

  • The Properties option can be used to specify properties to objects and items of objects such as Graph, MeshRegion and BoundaryMeshRegion.
  • Properties->{item1->{prop1->val1,prop2->val2,},} indicates that item1 has the property-value pairs prop1->val1, prop2->val2, etc.
  • Item specifications for each type of object are given in their reference pages.
  • The Properties option can be used to specify inheritance of properties in constructs such as Subgraph, EdgeAdd and GraphUnion.
  • Typical settings for inheritance of properties include:
  • Inheritedinherit all properties
    Automaticuse automatic inheritance of properties
    Noneset no inheritance

Examples

open all close all

Basic Examples  (3)

Specify a vertex property:

In[1]:=
Click for copyable input
Out[1]=

Specify a property for the graph itself:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Inherit all properties of the graph:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Use automatic inheritance of properties:

In[3]:=
Click for copyable input
Out[3]=

Set no inheritance:

In[4]:=
Click for copyable input
Out[4]=

Scope  (5)

Introduced in 2010
(8.0)
|
Updated in 2019
(12.0)