Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1281 default marker size too small #1617

Merged
merged 1 commit into from Oct 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Packages/vcs/Lib/marker.py
Expand Up @@ -229,14 +229,14 @@ def _getsize(self):
return self._size

def _setsize(self, value):
if isinstance(value, int):
if VCS_validation_functions.isNumber(value):
value = [value, ]
if value is not None:
value = VCS_validation_functions.checkListOfNumbers(
self,
'size',
value,
minvalue=1,
minvalue=0,
maxvalue=300)
self._size = value
size = property(_getsize, _setsize)
Expand Down
2 changes: 1 addition & 1 deletion Packages/vcs/Lib/unified1D.py
Expand Up @@ -527,7 +527,7 @@ def _getmarkersize(self):

def _setmarkersize(self, value):
if value is not None:
value = VCS_validation_functions.checkInt(
value = VCS_validation_functions.checkNumber(
self,
'markersize',
value,
Expand Down
1 change: 1 addition & 0 deletions Packages/vcs/Lib/vcs2vtk.py
Expand Up @@ -1214,6 +1214,7 @@ def prepGlyph(g, marker, index=0):
if t == 'dot':
gs.SetGlyphTypeToCircle()
gs.FilledOn()
s *= numpy.pi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make it a integer number say 10, 20? it may help if we are going to do pixel align rendering.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking at numbers with a scientist, 3 wasn't right and 4 too big. So I made it fun. Beside s is not an integer to start with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking at numbers with a scientist, 3 wasn't right and 4 too big. So I made it fun. Beside s is not an integer to start with.

I see. I am bit surprised that s is not an integer.

elif t == 'circle':
gs.SetGlyphTypeToCircle()
gs.FilledOff()
Expand Down