Skip to content
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

Feat Req: Accessing statistical values computed for plots #655

Closed
jat255 opened this issue Jul 27, 2015 · 7 comments

Comments

@jat255
Copy link

@jat255 jat255 commented Jul 27, 2015

Sometimes it is desirable to get the values that are plotted for reference (using seaborn as a calculation package, as well as plotting).

Currently, it appears (please correct me if I'm just oblivious to it) that there is no easy way to access the values that are calculated for the plots (such as the mean, confidence intervals, etc.). In order to access these, I had to explicitly create my own _BarPlotter (for instance) to get at it's parameters.

This is something that other people have expressed interest in as well (see this Stack Overflow question and my answer). Is this functionality available, or are there any plans to make it accessible?

@mwaskom

This comment has been minimized.

Copy link
Owner

@mwaskom mwaskom commented Jul 27, 2015

It is not available, and it will not be made available.

You should use statsmodels if you want to do statistical testing.

@jat255

This comment has been minimized.

Copy link
Author

@jat255 jat255 commented Jul 27, 2015

Right. Thanks for the consideration.

Is it that unreasonable to output some information that is already calculated (could be a switch that defaults to 'off')? I don't think it adds much complexity, and these are values that people are interested in, clearly. It's not really statistical testing, so much as getting a quantitative value out of your plot...

@olgabot

This comment has been minimized.

Copy link
Contributor

@olgabot olgabot commented Jul 27, 2015

When I need to do something like that, I end up writing the code myself. Here's some examples for a count-style FacetGrid annotated with values other than the values provided, e.g. here I wanted to plot percentages but annotate with absolute values. The code for the plot below is here

image

@mwaskom

This comment has been minimized.

Copy link
Owner

@mwaskom mwaskom commented Jul 27, 2015

It would be a large change to the function of the package, and it is out of scope because seaborn is a library for visualization, not for statistics (statsmodels) or data munging (pandas).

@mwaskom mwaskom closed this Aug 20, 2015
@qbilius

This comment has been minimized.

Copy link

@qbilius qbilius commented Oct 27, 2015

I wanted to provide additional motivation why it is important to provide access to the statistics that were computed while generating plots in seaborn. These figures often end up in scientific reports, where it is important to be precise about the analysis that was performed. Without an access to the details how a particular statistic (e.g., a regression line) was computed, it becomes more difficult to establish that the statistic shown in the figure is exactly the same as the one computed externaly via pandas / statsmodels. In other words, to use seaborn-generated figures in my reports, I need to rerun statistical analyses myself, visualize them with matplotlib and make sure they match seaborn's output exactly.

@jaradc

This comment has been minimized.

Copy link

@jaradc jaradc commented Mar 2, 2018

@mwaskom There's clearly demand. Naturally, some users that plot statistical plots would want access to the underlying statistics that generated the plot.

It doesn't save me any time to use Seaborn if I know I'll need the underlying statistics to the plots that Seaborn generates internally but doesn't provide.

To provide statistical plots, and not the underlying statistics optionally in the output, and then say that Seaborn is a visualization librbary or use the "out of scope" defense is not adequate or believable. It leaves us with one response - use Seaborn, or don't.

@mwaskom

This comment has been minimized.

Copy link
Owner

@mwaskom mwaskom commented Mar 2, 2018

Ok, then don’t use seaborn. Problem solved!

Repository owner locked as resolved and limited conversation to collaborators Mar 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.