Property

As of Version 12.1, Property has been superseded by Annotation.

Property[item,namevalue]

associates the property namevalue with item.

Details

  • Properties are used to store and manipulate name->value pairs for specific named items within an object such as Graph, MeshRegion and BoundaryMeshRegion.
  • Property acts as an inert wrapper around items.
  • Objects that support properties include Graph, MeshRegion and BoundaryMeshRegion. Item specifications for each type of object is given in their reference pages.

Examples

open allclose all

Basic Examples  (2)

Specify a vertex property:

Specify an edge property:

Scope  (9)

Basic Uses  (3)

Set properties for vertices:

And edges:

Property can be used to set several properties of vertices:

And edges:

Some properties have equivalent wrappers, including Labeled:

And Style:

Vertex Properties  (3)

Standard vertex properties include VertexStyle:

VertexLabels:

VertexSize:

VertexShape:

VertexShapeFunction:

Non-visual properties include VertexWeight:

Specify a custom property:

Edge Properties  (3)

Standard edge properties include EdgeStyle:

EdgeLabels:

Non-visual properties include EdgeWeight:

Specify a custom property:

Applications  (1)

Use Table to set similar properties for many items:

Properties & Relations  (6)

Use PropertyValue to extract values:

For undefined properties, the value $Failed is returned:

Use PropertyValue to set properties in a graph:

The original graph has changed:

Use PropertyValue to unset properties in a graph:

The original graph has changed:

Use PropertyList to test for the presence of a property:

Generate a list of vertex label rules:

Use SetProperty to set a property without changing the original:

The original graph is unchanged:

Use RemoveProperty to remove a property without changing the original:

The original graph is unchanged:

Wolfram Research (2010), Property, Wolfram Language function, https://reference.wolfram.com/language/ref/Property.html (updated 2015).

Text

Wolfram Research (2010), Property, Wolfram Language function, https://reference.wolfram.com/language/ref/Property.html (updated 2015).

CMS

Wolfram Language. 2010. "Property." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/Property.html.

APA

Wolfram Language. (2010). Property. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Property.html

BibTeX

@misc{reference.wolfram_2024_property, author="Wolfram Research", title="{Property}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/Property.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_property, organization={Wolfram Research}, title={Property}, year={2015}, url={https://reference.wolfram.com/language/ref/Property.html}, note=[Accessed: 30-December-2024 ]}