Skip to content

Commit

Permalink
Merge #3260
Browse files Browse the repository at this point in the history
3260: OpenGL sphinx doc: particle_type_materials fix r=KaiSzuttor a=hirschsn

Corrects a small bug in the OpenGL visualization tutorial: `particle_type_materials` expects strings. Also, the corresponding docstring should have an `array_like`.


PR Checklist
------------
 - [ ] Tests?
   - [ ] Interface
   - [ ] Core 
 - [ ] Docs?


Co-authored-by: Steffen Hirschmann <[email protected]>
  • Loading branch information
bors[bot] and hirschsn authored Oct 18, 2019
2 parents 628b15a + b785971 commit b2b3aed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/sphinx/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ used, which are indexed circularly by the numerical particle type::
visualizer = visualization.openGLLive(system,
particle_coloring='type',
particle_type_colors=[[1, 1, 1], [0, 0, 1]],
particle_type_materials=[steel, bright])
particle_type_materials=["steel", "bright"])

Materials are stored in :attr:`espressomd.visualization_opengl.openGLLive.materials`.

Expand Down
2 changes: 1 addition & 1 deletion src/python/espressomd/visualization_opengl.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class openGLLive:
* ``'node'``: Color according to the node the particle is on.
particle_type_colors : array_like :obj:`float`, optional
Colors for particle types.
particle_type_materials : :obj:`str`, optional
particle_type_materials : array_like :obj:`str`, optional
Materials of the particle types.
particle_charge_colors : (2,) array_like of :obj:`float`, optional
Two colors for min/max charged particles.
Expand Down

0 comments on commit b2b3aed

Please sign in to comment.