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

update index, tutorial, and manual #1173

Merged
merged 5 commits into from
Jul 31, 2018
Merged

Conversation

bjarthur
Copy link
Member

@bjarthur bjarthur commented Jul 8, 2018

  1. made the index more succinct.
  2. the plot signatures in the tutorial were way out of date.
  3. moved the Array API from the manual to the tutorial
  4. added subplot_grid to the manual.
  5. use more interesting examples throughout
  6. remove the reference to D3 in the backends section (no longer exists, right?)
  7. make docstrings for Theme out of the text in the themes section.

once done it should be straightforward to convert the existing docs into a jupyter notebook for a video with @xorJane

closes #1161

@codecov-io
Copy link

codecov-io commented Jul 9, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@3071ad6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1173   +/-   ##
=========================================
  Coverage          ?   87.32%           
=========================================
  Files             ?       34           
  Lines             ?     4080           
  Branches          ?        0           
=========================================
  Hits              ?     3563           
  Misses            ?      517           
  Partials          ?        0
Impacted Files Coverage Δ
src/guide.jl 86.21% <ø> (ø)
src/guide/keys.jl 92.4% <ø> (ø)
src/varset.jl 100% <ø> (ø)
src/Gadfly.jl 79.04% <ø> (ø)
src/theme.jl 67.3% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3071ad6...f27b11a. Read the comment docs.

@bjarthur bjarthur changed the title WIP: update index, tutorial, and manual update index, tutorial, and manual Jul 20, 2018
@bjarthur bjarthur force-pushed the bja/docs branch 2 times, most recently from 9479107 to f213dce Compare July 26, 2018 21:23
@bjarthur
Copy link
Member Author

this is ready to merge i think. could someone please review?

in particular, please let me know if the tutorial and manual are now amenable to a simple translation into a jupyter notebook for a video tutorial. i tried to work them towards this direction.

one thing i need to fix is the strange "Plot(...)Plot(...)" in the output when building the docs.

i'll be completely offline from august 2-15th, and plan on digging into 0.7 when i get back.

Copy link

@xorJane xorJane left a comment

Choose a reason for hiding this comment

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

I looked at the tutorial and manual changes. The manual looks more clear with these changes and the tutorial looks great. It should be easy to convert these to notebooks for a video tutorial. :)

mapping "aesthetics" to columns in the data frame, and this is followed by some
number of elements, which are the nouns and verbs, so to speak, that form the
The first argument is the data to be plotted, the keyword arguments at the end
map "aesthetics" to columns in the data frame, and everything in between is some
Copy link

Choose a reason for hiding this comment

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

This sentence was a little long/hard for me to read on a first pass. Perhaps consider breaking it up as

The first argument is the data to be plotted and the keyword arguments at the end map "aesthetics" to columns in the data frame. All input arguments between data and mapping are some number of "elements", which are the nouns and verbs, so to speak, that form the grammar.

Copy link
Member

Choose a reason for hiding this comment

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

I second this.

Copy link
Member

@tlnagy tlnagy left a comment

Choose a reason for hiding this comment

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

This is a great update overall, I only have a couple minor comments.

## Examples
The constructor for `Theme` takes zero or more keyword arguments each of which
overrides the default value of the corresponding field. See the Theme entry in
the [Library](@ref Gadfly) for a full list of keywords.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe have a direct link to Theme's docstring here?

mapping "aesthetics" to columns in the data frame, and this is followed by some
number of elements, which are the nouns and verbs, so to speak, that form the
The first argument is the data to be plotted, the keyword arguments at the end
map "aesthetics" to columns in the data frame, and everything in between is some
Copy link
Member

Choose a reason for hiding this comment

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

I second this.

```

Note that there is also no need to specify `Geom.point`, as that will be
supplied automatically if no other geometries are given.
Copy link
Member

Choose a reason for hiding this comment

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

Should we be recommending this behavior? IMO it's better to be explicit about what we're plotting.

Copy link
Member Author

Choose a reason for hiding this comment

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

if we ever removed Geom.point as a default, then we should make this change. otherwise best to document it i think.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we could say something along the lines of:

In cases where no explicit geometry is provided, the plot will use Geom.point by default.

This way, it doesn't sound like we're recommending this behavior, but it does document that this is the default.

plot(elements::Element...; mapping...)
```

Here, the keyword arguments directly supply the data to be ploted,
Copy link
Member

Choose a reason for hiding this comment

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

ploted

Should be plotted.

instead of using them to indicate which columns of a DataFrame to use.

Not sure if this adds anything

```

Note that with the Array interface, extra elements must be included to specify the
axis labels, whereas with a DataFrame they default to the column names.
Copy link
Member

Choose a reason for hiding this comment

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

Note that with the Array interface, extra elements must be included to specify the axis labels, whereas with a DataFrame they default to the column names.

What about:

Note that with the Array interface, the axis labels cannot be directly inferred so include explicit calls to Guide.xlabel etc to specify the axis names.


"""
$(FIELDS)
"""
Copy link
Member

Choose a reason for hiding this comment

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

🎉

This will make keeping the docs in sync much easier and avoid issues like #852

src/theme.jl Outdated

"""
$(FIELDS)
"""
@varset Theme begin
# If the color aesthetic is not mapped to anything, this is the color that
# is used.
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the comments are unnecessary with the docstring update and we should remove them.

src/varset.jl Outdated
end
"doc struct"
@foo(Foo, "doc var", x, Int)
=#
Copy link
Member

Choose a reason for hiding this comment

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

Where is this macro used?

@bjarthur bjarthur force-pushed the bja/docs branch 4 times, most recently from 88d35de to 7178ec7 Compare July 30, 2018 11:36
@bjarthur
Copy link
Member Author

thanks for the reviews! will merge once CI passes.

@bjarthur bjarthur force-pushed the bja/docs branch 2 times, most recently from 2449844 to f27b11a Compare July 31, 2018 11:14
@bjarthur bjarthur merged commit fcf7596 into GiovineItalia:master Jul 31, 2018
@bjarthur bjarthur deleted the bja/docs branch July 31, 2018 11:20
@bjarthur
Copy link
Member Author

merged! @xorJane what are the next steps to create a video tutorial?

@xorJane
Copy link

xorJane commented Aug 20, 2018

@bjarthur I'm so sorry I missed this! Now that you already have content, the steps are just to schedule the tutorial, show you how to stream/check your internet connection prior to that date, and then stream/talk through the tutorial on the scheduled date. If you have a sense of what dates might be good for you, let me know and we can put up announcements on julialang.org/learning as well as discourse, etc.

Do you have access to a stable ethernet connection? Upload speeds over wifi have been pretty consistently bad/unreliable for previous tutorials, and then we see a lot of buffering and resulting frustration. :)

@xorJane
Copy link

xorJane commented Aug 20, 2018

And thank you again!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use DocStringExtensions in Gadfly
4 participants