-
Notifications
You must be signed in to change notification settings - Fork 795
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
Correct the method-based syntax for a few more gallery examples #3005
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two inline comments/suggestions
@@ -69,7 +69,7 @@ | |||
alt.Chart(source).mark_point(filled=True, opacity=1, size=100).encode( | |||
alt.X('x:O').axis(None), | |||
alt.Y('animal:O').axis(None), | |||
alt.Row('country:N').header(title=''), | |||
alt.Row('country:N').title(''), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alt.Row('country:N').title(''), | |
alt.Row('country:N').title(None), |
I prefer None
over ''
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting. I think None
is more semantically correct but ''
is more convenient to type and I remember that when I started to use Altair a few years ago, there was some context where None
didn't work, but ''
did. It is possible that I was just doing something wrong back then, but I will see if I can find it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be, I can remember something similar. But I would consider that as a limitation of Vega-Lite at that moment.
@@ -11,7 +11,7 @@ | |||
source = data.seattle_weather() | |||
|
|||
base = alt.Chart(source).encode( | |||
alt.X('month(date):T').axis(title=None) | |||
alt.X('month(date):T').title('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alt.X('month(date):T').title('') | |
alt.X('month(date):T').title(None) |
Or there is another reason why you opt for ''
?
0259208
to
3b9ac58
Compare
3b9ac58
to
9602812
Compare
@mattijn I forgot about this for some while, but I noticed it now and went ahead with your suggestion of using |
No description provided.