Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions altair/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,12 @@ def decorate(f):

# Supplement the docstring of f with information from Obj
if Obj.__doc__:

# Patch in a reference to the class this docstring is copied from,
# to generate a hyperlink
doclines = Obj.__doc__.splitlines()
doclines[0] = f"Refer to :class:`{Obj.__name__}`"

if f.__doc__:
doc = f.__doc__ + "\n".join(doclines[1:])
else:
Expand Down
60 changes: 15 additions & 45 deletions altair/vegalite/v3/schema/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ def mark_area(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'area'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'area' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -57,9 +55,7 @@ def mark_bar(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpac
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'bar'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'bar' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -93,9 +89,7 @@ def mark_line(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'line'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'line' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -130,9 +124,7 @@ def mark_trail(self, align=Undefined, angle=Undefined, baseline=Undefined, binSp
thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
yOffset=Undefined, **kwds):
"""Set the chart's mark to 'trail'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'trail' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -167,9 +159,7 @@ def mark_point(self, align=Undefined, angle=Undefined, baseline=Undefined, binSp
thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined,
yOffset=Undefined, **kwds):
"""Set the chart's mark to 'point'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'point' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -203,9 +193,7 @@ def mark_text(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'text'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'text' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -239,9 +227,7 @@ def mark_tick(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'tick'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'tick' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -275,9 +261,7 @@ def mark_rect(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'rect'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'rect' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -311,9 +295,7 @@ def mark_rule(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa
text=Undefined, theta=Undefined, thickness=Undefined, tooltip=Undefined,
width=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined,
y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'rule'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'rule' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -348,9 +330,7 @@ def mark_circle(self, align=Undefined, angle=Undefined, baseline=Undefined, binS
thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'circle'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'circle' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -385,9 +365,7 @@ def mark_square(self, align=Undefined, angle=Undefined, baseline=Undefined, binS
thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined,
x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'square'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'square' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand Down Expand Up @@ -422,9 +400,7 @@ def mark_geoshape(self, align=Undefined, angle=Undefined, baseline=Undefined, bi
thickness=Undefined, tooltip=Undefined, width=Undefined, x=Undefined,
x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined,
y2Offset=Undefined, yOffset=Undefined, **kwds):
"""Set the chart's mark to 'geoshape'

For information on additional arguments, see :class:`MarkDef`
"""Set the chart's mark to 'geoshape' (see :class:`MarkDef`)
"""
kwds = dict(align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip,
color=color, cornerRadius=cornerRadius, cursor=cursor, dir=dir, dx=dx, dy=dy,
Expand All @@ -448,9 +424,7 @@ def mark_geoshape(self, align=Undefined, angle=Undefined, baseline=Undefined, bi
def mark_boxplot(self, box=Undefined, clip=Undefined, color=Undefined, extent=Undefined,
median=Undefined, opacity=Undefined, orient=Undefined, outliers=Undefined,
rule=Undefined, size=Undefined, ticks=Undefined, **kwds):
"""Set the chart's mark to 'boxplot'

For information on additional arguments, see :class:`BoxPlotDef`
"""Set the chart's mark to 'boxplot' (see :class:`BoxPlotDef`)
"""
kwds = dict(box=box, clip=clip, color=color, extent=extent, median=median, opacity=opacity,
orient=orient, outliers=outliers, rule=rule, size=size, ticks=ticks, **kwds)
Expand All @@ -463,9 +437,7 @@ def mark_boxplot(self, box=Undefined, clip=Undefined, color=Undefined, extent=Un

def mark_errorbar(self, clip=Undefined, color=Undefined, extent=Undefined, opacity=Undefined,
orient=Undefined, rule=Undefined, ticks=Undefined, **kwds):
"""Set the chart's mark to 'errorbar'

For information on additional arguments, see :class:`ErrorBarDef`
"""Set the chart's mark to 'errorbar' (see :class:`ErrorBarDef`)
"""
kwds = dict(clip=clip, color=color, extent=extent, opacity=opacity, orient=orient, rule=rule,
ticks=ticks, **kwds)
Expand All @@ -479,9 +451,7 @@ def mark_errorbar(self, clip=Undefined, color=Undefined, extent=Undefined, opaci
def mark_errorband(self, band=Undefined, borders=Undefined, clip=Undefined, color=Undefined,
extent=Undefined, interpolate=Undefined, opacity=Undefined, orient=Undefined,
tension=Undefined, **kwds):
"""Set the chart's mark to 'errorband'

For information on additional arguments, see :class:`ErrorBandDef`
"""Set the chart's mark to 'errorband' (see :class:`ErrorBandDef`)
"""
kwds = dict(band=band, borders=borders, clip=clip, color=color, extent=extent,
interpolate=interpolate, opacity=opacity, orient=orient, tension=tension, **kwds)
Expand Down
Loading