Commit 10d7a085 authored by Daniel Böckenhoff (Laptop)'s avatar Daniel Böckenhoff (Laptop)
Browse files

presentation new problem

parent afe4fbec
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1503,6 +1503,26 @@ class TensorFields(Tensors):
weights = self.fields[weights]
return super(TensorFields, self)._weights(weights, rigid=rigid)
def plot(self, **kwargs):
Override Tensors plot method:
By default, vector fields are plotted with the quiver method
field_index = kwargs.pop('field_index', None)
if field_index is None:
artist = super(TensorFields, self).plot(**kwargs)
field = self.fields[field_index]
if field.dim == 1:
artist = super(TensorFields, self).plot(c=field, **kwargs)
elif field.dim in (2, 3):
artist = tfields.plotting.plot_tensor_field(self, field,
raise NotImplementedError("Field of dimension {field.dim}"
return artist
class TensorMaps(TensorFields):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment