PropertyList[{obj,itemspec}]
lists the properties available for itemspec in obj.
PropertyList
PropertyList[{obj,itemspec}]
lists the properties available for itemspec in obj.
Details
- Properties are used to store and manipulate name->value pairs for specific named items within an object such as Graph, MeshRegion, and BoundaryMeshRegion.
- The item specification itemspec typically has the form {collection,index}.
- The index can typically have the following forms:
-
ind a single index {ind1,ind2,…} a list of indexes All all possible indexes in collection patt indexes that match patt in collection - The collection can typically have the following forms:
-
col a single collection {col1,col2,…} a list of collections All all possible collections patt collections that match patt - The item specification itemspec of the form collection refers to the default value for all indexes in the collection.
- For an item specification itemspec that refers to more than a single item, PropertyList will give the union of properties for the different 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 all close allBasic Examples (2)
Get a list of standard properties for a vertex:
g = CompleteGraph[4]PropertyList[{g, 1}]PropertyList[{g, 12}]Test for the presence of custom properties:
Graph[{Property[1, "Material" -> "Wood"], 2, 3}, {12, 23, 31}]{MemberQ[PropertyList[{%, 1}], "Material"], MemberQ[PropertyList[{%, 1}], "Taste"]}Scope (1)
PropertyList applies to vertices:
Graph[{Property[1, {VertexWeight -> 4, "Material" -> "Wood"}], 2, 3}, {12, 23, 31}]PropertyList[{%, 1}]Graph[{1, 2, 3}, {Property[12, EdgeLabels -> "hello"], 23, 31}]PropertyList[{%, 12}]Properties & Relations (6)
Use Property as a wrapper to specify properties in functions such as Graph:
Graph[{Property[1, {VertexSize -> Medium, VertexStyle -> Red}], 2, 3}, {12, 23, 31}]Use PropertyValue to extract values:
g = CompleteGraph[4, VertexStyle -> {1 -> Red}, VertexSize -> Small]PropertyValue[{g, 1}, VertexStyle]For undefined properties, the value $Failed is returned:
PropertyValue[{g, 1}, "foo"]MemberQ[PropertyList[{g, 1}], "foo"]Use PropertyValue to set properties in a graph:
g = CompleteGraph[4]PropertyValue[{g, 1}, VertexSize] = Small;The original graph has changed:
gUse PropertyValue to unset properties in a graph:
g = CompleteGraph[4, VertexSize -> {1 -> Small}]PropertyValue[{g, 1}, VertexSize]=.;The original graph has changed:
gUse SetProperty to set the properties in a new graph:
g = CompleteGraph[4]SetProperty[{g, 1}, VertexSize -> Small]The original graph is unchanged:
gUse RemoveProperty to remove a property without changing the original:
g = CompleteGraph[4, VertexSize -> {1 -> Small}]RemoveProperty[{g, 1}, VertexSize]The original graph is unchanged:
gSee Also
Related Guides
Text
Wolfram Research (2010), PropertyList, Wolfram Language function, https://reference.wolfram.com/language/ref/PropertyList.html (updated 2015).
CMS
Wolfram Language. 2010. "PropertyList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/PropertyList.html.
APA
Wolfram Language. (2010). PropertyList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PropertyList.html
BibTeX
@misc{reference.wolfram_2026_propertylist, author="Wolfram Research", title="{PropertyList}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/PropertyList.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_propertylist, organization={Wolfram Research}, title={PropertyList}, year={2015}, url={https://reference.wolfram.com/language/ref/PropertyList.html}, note=[Accessed: 15-June-2026]}