DisplayDict

class marxs.visualization.utils.DisplayDict(parent, *args, **kwargs)[source] [edit on github]

Bases: dict

A dictionary to store how an element is displayed in plotting.

A dictionary of this type works just like a normal dictionary, except for an additional look-up step for keys that are not found in the dictionary itself. A DisplayDict is initialized with a reference to the object it describes and any parameter accessed from DisplayDict that is not found in the dictionary will be searched for in the object’s geometry. This allows us to set any and all display settings in the DisplayDict to customize plotting in any way without affecting how the ray-trace is run (which uses only the parameters set in the geoemtry), but for those values that are not set, fall back to the settings of the geometry (e.g. the shape of an object is typically taken from the geometry, while the color is not).

Parameters:
parentmarxs.base.MarxsElement

Reference to the object that is described by this DisplayDict

args, kwargs: see `dict`

Methods Summary

get(k[,d])

Methods Documentation

get(k[, d]) D[k] if k in D, else d.  d defaults to None.[source] [edit on github]