Skip to content

Autodoc style bis #188

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

Merged
merged 5 commits into from
Nov 11, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions apidoc/_static/plotly-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,19 @@
.body {
font-family: "Open Sans", sans-serif;
}
.navbar-brand img {
height: 30px;
margin-top: 4px;
}

.navbar .container {
padding-top: 8px;
}

a {
color: #2391fe !important;
}

code {
color: #2391fe !important;
}
26 changes: 15 additions & 11 deletions apidoc/_templates/class_figure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
.. autosummary::
:toctree: generated/

Figure

Figure.show
Figure.add_traces
Figure.update_traces
Figure.update_layout


.. autoclass:: {{ objname }}
{% block methods %}
.. automethod:: __init__
.. automethod:: show
.. automethod:: update_layout
.. automethod:: add_traces
{% endblock %}

Other methods
{{ underline }}==============

.. autosummary::
:toctree: generated/

plotly.graph_objects.{{ objname }}

.. autoclass:: {{ objname }}
:members:
:inherited-members:

.. raw:: html

<div class="clearer"></div>

4 changes: 2 additions & 2 deletions apidoc/_templates/trace.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`{{module}}`.{{objname}}
{{ underline }}
{{ underline }}============================


.. currentmodule:: {{ module }}
Expand All @@ -12,7 +12,7 @@


:mod:`{{module}}`.{{objname.lower()}}
{{ underline }}
{{ underline }}================================

.. autosummary::

Expand Down
21 changes: 0 additions & 21 deletions apidoc/figure.rst

This file was deleted.

4 changes: 2 additions & 2 deletions apidoc/figure_factory.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _ff:

Figure Factory
`plotly.figure_factory`: helper methods for building specific complex charts
==============

.. currentmodule:: plotly.figure_factory
Expand All @@ -23,6 +23,6 @@ Figure Factory
create_streamline
create_table
create_ternary_contour
create_trisurf
create_trisurf
create_violin

13 changes: 8 additions & 5 deletions apidoc/graph_objects.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _graph-objects:

Graph objects: figures, traces and layout
`plotly.graph_objects`: low-level interface to figures, traces and layout
=========================================

.. currentmodule:: plotly.graph_objects
Expand All @@ -11,11 +11,14 @@ Graph objects: figures, traces and layout

>>> import plotly.graph_objects as go

.. toctree::
:maxdepth: 1
:caption: Figure:
Figure
------

.. autosummary::
:toctree: generated/
:template: class_figure.rst

figure.rst
Figure


Layout
Expand Down
12 changes: 6 additions & 6 deletions apidoc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

plotly API reference
Python API reference for `plotly`
====================

This is the reference of plotly's API. Also see `plotly's documentation website <https://plot.ly/python>`_.
Expand All @@ -12,11 +12,11 @@ Submodules
----------


* :ref:`Plotly express <px>`
* :ref:`Graph objects: figures, traces and layout <graph-objects>`
* :ref:`Subplots <subplots>`
* :ref:`Figure Factory <ff>`
* :ref:`I/O <io>`
* :ref:`Plotly Express: high-level interface for data visualization <px>`
* :ref:`Graph Objects: low-level interface to figures, traces and layout <graph-objects>`
* :ref:`Subplots: helper function for layout out multi-plot figures <subplots>`
* :ref:`Figure Factories: helper methods for building specific complex charts <ff>`
* :ref:`I/O: low-level interface for displaying, reading and writing figures <io>`

Full reference list
-------------------
Expand Down
2 changes: 1 addition & 1 deletion apidoc/io.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _io:

I/O
`plotly.io`: low-level interface for displaying, reading and writing figures
==============

.. currentmodule:: plotly.io
Expand Down
2 changes: 1 addition & 1 deletion apidoc/px.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _px:

Plotly express: `plotly.express`
`plotly.express`: high-level interface for data visualization
================================

The `plotly.express <https://plot.ly/python/plotly-express/>`_ module is
Expand Down
2 changes: 1 addition & 1 deletion apidoc/subplots.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _subplots:

Subplots: `plotly.subplots`
`plotly.subplots`: helper function for laying out multi-plot figures
===========================

.. currentmodule:: plotly.subplots
Expand Down