Open alexpeters1208 opened 11 months ago
@alexpeters1208 heh, it seems others are confused about the matplotlib explicit vs. implicit interface as well:
In any case, I don't think we should be investing too much time into these. We can provide our preference for the explicit interface, but even then, for animations/ticking data we should be suggest using the deephaven-express interface instead (has better performance for ticking data).
Our documentation has been updated to not use the global scope (plt.clf()
, plt.gcf()
, or plt.anything()
) in our docs. I will add a disclaimer to the docs as they are now warning users not to pollute the global scope. It really only matters when plotting data from multiple ticking sources, but things can go awry in confusing ways in that case.
Another thing we may want to detail is how typings are handled. It looks like we're using the Pandas dtypes, like Float64DType
, but seaborn/matplotlib do not fully support that data type. I think we're using the Float64DType
so that it is nullable (is that correct @jmao-denver ?) so we should recommend in the matplotlib code to convert them to float64
type instead, and have some other way to filter out nulls.
@rachelmbrubaker In a devrel meeting, we decided that the best move going forward is not to spend effort on creating a concept guide for Matplotlib's implicit vs. explicit interfaces. Instead, we're going to ensure that existing documentation highlights the need for using the explicit interface. There was talk of getting the code to throw a warning or an error when the implicit interface is used, but I'm not sure if it was decided if we really want that and if so, who owns that issue. Maybe @chipkent can comment. I am going to update the body of the ticket with an ongoing list of things that have been resolved or changed.
From a docs standpoint:
Once the linked PR is merged, community docs are considered fixed for the sake of this ticket.
From a docs standpoint:
- Our matplotlib how-to guide has been fixed to only use the explicit interface
- Our seaborn how-to guide has been fixed to only use the explicit interface
- There is a PR with updates to the how-to use plugins guide
Once the linked PR is merged, community docs are considered fixed for the sake of this ticket.
The PR mentioned above is merged, so I am going to update the ongoing list and mark that item as complete.
Relates to 186. Some of the noted issues may be resolved when that ticket is addressed.
This is a concise description of the extensive discussions that have gone on between myself, @rachelmbrubaker, @mofojed, @chipkent, @jjbrosnan, and others. Hopefully, this will help @rachelmbrubaker in collecting all of the relevant issues and discussions under one roof.
Description
Using Matplotlib from Deephaven was shown to have many bugs as of DHC 0.28.0 and DHE Vermilion. They were first outlined in a Jira ticket posted in September by @danshelley-illumon. More were discovered after this point. Here is a summary of those bugs:
Calls to
sns.lineplot()
produce this error:Calls to
sns.scatterplot()
produce this error if used on a table with 7 or more entries, or when a ticking table ticks up to 7 or more rows:Calls to both
sns.lineplot()
andsns.scatterplot()
produce a litany of warnings that are increasingly annoying with ticking tables. Most of these warnings look like this:Investigation
Investigation between myself, @jjbrosnan, and @mofojed revealed a couple of key things.
Additionally, @mofojed and @chipkent have expressed the opinion that all Deephaven-related Matplotlib usage should be done with Matplotlib's explicit interface, as opposed to their implicit interface, which are outlined and compared here. This will require updates to docs, examples, and tests on the community side, and likely the same on the enterprise side.
Path forward
Assigning this to @rachelmbrubaker not because she owns the work required, but because she will determine when this ticket is sufficiently resolved to close.
Current Progress as of 10/27/23