code: def matches(self, spec):
          
          if callable(spec) and not isinstance(spec, type): return spec(self)
          elif isinstance(spec, type): return isinstance(self, spec)
          else:
              raise ValueError("Matching specs have to be either a type or a callable.")
docs: Matches a specification against the current Plot.