-
Notifications
You must be signed in to change notification settings - Fork 801
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
Documentation for each mark type #2607
Changes from 1 commit
fd53e00
36c8b60
668fe0a
dde38d4
9a7a4f4
10baa15
b33e397
70798ae
b6fe6bb
2e82e4b
6f26d9b
471c1d6
b1b9b21
a490c8c
82e715d
fa375a2
3a2a587
1808040
cef9312
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. currentmodule:: altair | ||
|
||
.. _user-guide-marks: | ||
|
||
Marks | ||
~~~~~ | ||
|
||
We saw in :ref:`user-guide-encoding` that the :meth:`~Chart.encode` method is | ||
used to map columns to visual attributes of the plot. | ||
The ``mark`` property is what specifies how exactly those attributes | ||
should be represented on the plot. | ||
|
||
Altair provides a number of basic mark properties | ||
(the mark properties column links to the Vega-Lite documentation | ||
that allows you to interactively explore the effects of modifying each property): | ||
|
||
========================================= ========================================= ================================================================================ | ||
Mark Method Description | ||
========================================= ========================================= ================================================================================ | ||
:ref:`user-guide-arc-marks` :meth:`~Chart.mark_arc` A pie chart. | ||
:ref:`user-guide-area-marks` :meth:`~Chart.mark_area` A filled area plot. | ||
bar :meth:`~Chart.mark_bar` A bar plot. | ||
circle :meth:`~Chart.mark_circle` A scatter plot with filled circles. | ||
geoshape :meth:`~Chart.mark_geoshape` Visualization containing spatial data | ||
image :meth:`~Chart.mark_image` A scatter plot with image markers. | ||
line :meth:`~Chart.mark_line` A line plot. | ||
point :meth:`~Chart.mark_point` A scatter plot with configurable point shapes. | ||
rect :meth:`~Chart.mark_rect` A filled rectangle, used for heatmaps | ||
rule :meth:`~Chart.mark_rule` A vertical or horizontal line spanning the axis. | ||
square :meth:`~Chart.mark_square` A scatter plot with filled squares. | ||
text :meth:`~Chart.mark_text` A scatter plot with points represented by text. | ||
tick :meth:`~Chart.mark_tick` A vertical or horizontal tick mark. | ||
trail :meth:`~Chart.mark_trail` A line with variable widths. | ||
========================================= ========================================= ================================================================================ | ||
|
||
In addition, Altair provides the following compound marks: | ||
|
||
========== ============================== ================================ ================================== | ||
Mark Name Method Description Example | ||
========== ============================== ================================ ================================== | ||
box plot :meth:`~Chart.mark_boxplot` A box plot. :ref:`gallery_boxplot` | ||
error band :meth:`~Chart.mark_errorband` A continuous band around a line. :ref:`gallery_line_with_ci` | ||
error bar :meth:`~Chart.mark_errorbar` An errorbar around a point. :ref:`gallery_errorbars_with_ci` | ||
========== ============================== ================================ ================================== | ||
|
||
In Altair, marks can be most conveniently specified by the ``mark_*`` methods | ||
of the Chart object, which take optional keyword arguments that are passed to | ||
:class:`MarkDef` to configure the look of the marks. | ||
|
||
Mark Properties | ||
_______________ | ||
|
||
As seen in the last two examples, additional arguments to ``mark_*()`` methods are passed along to an | ||
associated :class:`MarkDef` instance, which supports the following attributes: | ||
|
||
.. altair-object-table:: altair.MarkDef | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to divide this table into subsections as in https://vega.github.io/vega-lite/docs/mark.html#mark-def? "General", "Color", etc. |
||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
arc | ||
area | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include all the marks here as well so that they show up in the navigation menu. Ping me once you have done this and I will rebuilt the docs and review all the marks after "Area" as well. |
||
|
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.
I like linking the pages here as you have done for the arc and area mark. Could you do the same for the remaining marks?