Skip to content

Commit

Permalink
Tweak intro to nextgen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed May 16, 2022
1 parent 221735f commit 4033caf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion doc/nextgen/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "e7636dfe-2eff-4dc7-8f4f-325768c28cb4",
"metadata": {},
"source": [
".. note::\n",
".. warning::\n",
"\n",
" This API is **experimental** and **unstable**. Please try it out and provide feedback, but expect it to change without warning prior to an official release."
]
Expand Down
14 changes: 6 additions & 8 deletions doc/nextgen/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"source": [
"# Next-generation seaborn interface\n",
"\n",
"Over the past year, I have been developing an entirely new interface for making plots with seaborn. The new interface is designed to be declarative, compositional and extensible. If successful, it will both greatly expand the space of plots that can be created with seaborn while making the experience of doing so simpler and more delightful.\n",
"Over the past year, I have been developing an entirely new interface for making plots with seaborn. The new interface is designed to be declarative, compositional and extensible. If successful, it will greatly expand the space of plots that can be created with seaborn while making the experience of using it simpler and more delightful.\n",
"\n",
"To make that concrete, here is how you make a [hello world example](http://seaborn.pydata.org/introduction.html#our-first-seaborn-plot) with the new interface:"
"To make that concrete, here is a [hello world example](http://seaborn.pydata.org/introduction.html#our-first-seaborn-plot) with the new interface:"
]
},
{
Expand Down Expand Up @@ -40,9 +40,9 @@
"id": "c76dbb00-20ee-4508-bca3-76a4763e5640",
"metadata": {},
"source": [
"## Installing the alpha\n",
"## Testing the alpha release\n",
"\n",
"If you're interested, please install the alpha and kick the tires. Expect some rough edges and some instability! But feedback will be very helpful in pushing this towards a more stable broad release:\n",
"If you're interested, please install the alpha and kick the tires. It is very far from complete, so expect some rough edges and instability! But feedback will be very helpful in pushing this towards a more stable broad release:\n",
"\n",
" pip install https://github.com/mwaskom/seaborn/archive/refs/tags/v0.12.0a0.tar.gz\n",
"\n",
Expand Down Expand Up @@ -72,11 +72,9 @@
"\n",
"Of course, \"write a new interface\" quickly turned into \"rethink every aspect of the library.\" The current interface has some [pain points](https://michaelwaskom.medium.com/three-common-seaborn-difficulties-10fdd0cc2a8b) that arise from early constraints and path dependence. By starting fresh, these can be avoided.\n",
"\n",
"Originally, seaborn existed as a toolbox of domain-specific statistical graphics to be used alongside matplotlib. As the library grew, it became more common to reach for — or even learn — seaborn first. But one inevitably desires some customization that is not offered within the (already much-too-long) list of parameters in seaborn's functions. Currently, this necessitates direct use of matplotlib.\n",
"Originally, seaborn existed as a toolbox of domain-specific statistical graphics to be used alongside matplotlib. As the library grew, it became more common to reach for — or even learn — seaborn first. But one inevitably desires some customization that is not offered within the (already much-too-long) list of parameters in seaborn's functions. Currently, this necessitates direct use of matplotlib. I've always thought that, if you're comfortable with both libraries, this setup offers a powerful blend of convenience and flexibility. But it can be hard to know which library will let you accomplish some specific task.\n",
"\n",
"I've always thought that, if you're comfortable with both libraries, this setup offers a powerful blend of convenience and flexibility. But it can be hard to know which library will let you accomplish some specific task. And, as seaborn has become more powerful, one has to write increasing amounts of matpotlib code to recreate what it is doing.\n",
"\n",
"So the new interface is designed to provide a more comprehensive experience, such that all of the steps involved in the creation of a reasonably-customized plot can be accomplished in the same way. And the compositional nature of the objects provides much more flexibility than currently exists in seaborn with a similar level of abstraction that lets you focus on *what* you want to show rather than *how* to show it.\n",
"So the new interface is designed to provide a more comprehensive experience, such that all of the steps involved in the creation of a reasonably-customized plot can be accomplished in the same way. And the compositional nature of the objects provides much more flexibility than currently exists in seaborn with a similar level of abstraction: this lets you focus on *what* you want to show rather than *how* to show it.\n",
"\n",
"One will note that the result looks a bit (a lot?) like ggplot. That's not unintentional, but the goal is also *not* to \"port ggplot2 to Python\". (If that's what you're looking for, check out the very nice [plotnine](https://plotnine.readthedocs.io/en/stable/) package). There is an immense amount of wisdom in the grammar of graphics and in its particular implementation as ggplot2. But, as languages, R and Python are just too different for idioms from one to feel natural when translated literally into the other. So while I have taken much inspiration from ggplot (along with vega-lite, d3, and other great libraries), I've also made plenty of choices differently, for better or for worse."
]
Expand Down
30 changes: 14 additions & 16 deletions doc/nextgen/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Next-generation seaborn interface

Over the past year, I have been developing an entirely new interface for
making plots with seaborn. The new interface is designed to be
declarative, compositional and extensible. If successful, it will both
declarative, compositional and extensible. If successful, it will
greatly expand the space of plots that can be created with seaborn while
making the experience of doing so simpler and more delightful.
making the experience of using it simpler and more delightful.

To make that concrete, here is how you make a `hello world
To make that concrete, here is a `hello world
example <http://seaborn.pydata.org/introduction.html#our-first-seaborn-plot>`__
with the new interface:

Expand Down Expand Up @@ -37,12 +37,13 @@ with the new interface:



Installing the alpha
--------------------
Testing the alpha release
-------------------------

If you’re interested, please install the alpha and kick the tires.
Expect some rough edges and some instability! But feedback will be very
helpful in pushing this towards a more stable broad release:
If you’re interested, please install the alpha and kick the tires. It is
very far from complete, so expect some rough edges and instability! But
feedback will be very helpful in pushing this towards a more stable
broad release:

::

Expand Down Expand Up @@ -77,19 +78,16 @@ graphics to be used alongside matplotlib. As the library grew, it became
more common to reach for — or even learn — seaborn first. But one
inevitably desires some customization that is not offered within the
(already much-too-long) list of parameters in seaborn’s functions.
Currently, this necessitates direct use of matplotlib.

I’ve always thought that, if you’re comfortable with both libraries,
this setup offers a powerful blend of convenience and flexibility. But
it can be hard to know which library will let you accomplish some
specific task. And, as seaborn has become more powerful, one has to
write increasing amounts of matpotlib code to recreate what it is doing.
Currently, this necessitates direct use of matplotlib. I’ve always
thought that, if you’re comfortable with both libraries, this setup
offers a powerful blend of convenience and flexibility. But it can be
hard to know which library will let you accomplish some specific task.

So the new interface is designed to provide a more comprehensive
experience, such that all of the steps involved in the creation of a
reasonably-customized plot can be accomplished in the same way. And the
compositional nature of the objects provides much more flexibility than
currently exists in seaborn with a similar level of abstraction that
currently exists in seaborn with a similar level of abstraction: this
lets you focus on *what* you want to show rather than *how* to show it.

One will note that the result looks a bit (a lot?) like ggplot. That’s
Expand Down

0 comments on commit 4033caf

Please sign in to comment.