Is it possible to know if the plot is set to linear or log scale along y-axis in matplotlib? I would like to perform further operations depending if the plot is log or linear.
Related
One of my projects needs order analysis of vibration signals with Python instead of Matlab, they want to visualize data using colormap which usually has frequency on the horizontal axis and rotational speed on the vertical axis. Just like this picture:
How can I do this?
When using seaborn's joint plot function, setting kind=reg will draw a scatter plot with regression line, an outer histogram and an estimated kernel density (see here).
I would like to get all of that, but not the kernel density estimation. However, it seems that the kind switch either gives me all or nothing. The only conceivable alternative is to use a standard regplot and then manually add the histograms around it.. is there any more convenient way of doing this?
The seaborn jointplot has arguments
{joint, marginal, annot}_kws : dicts, optional
Additional keyword arguments for the plot components.
Since it plots a distplot to the marginal axes, the marginal_kws needs to be used to pass additional keyword arguments to distplot.
The argument to be used to turn the kde off is found in the distplot documentation
kde : bool, optional
Whether to plot a gaussian kernel density estimate.
I plot a 2D KDE with seaborn with:
ax = sns.kdeplot(scatter_all["s_zscore"], scatter_all["p_zscore"])
I want my levels of the density estimation to be meaningful, ie. I wan to mark confidence intervals. Basically I would like to obtain something very close to:
this answer but the data are not normalized and it has to stay that way.
Could someone please provide me an explanation where, how and why should I change the calculations for the levels? I am looking for a clear statistical explanation as said in my comment below.
Is there a way to draw a frequency distribution graph in python or R?
In R, using histograms, which show frequency on y axis vs some categorization on x-axis as in your example.
hist() function at the very least help you plot one vector (a set of values). ?hist for brief documentation, also search this site
how to plot two vectors side by side, similar to your posted example, an example is at http://www.cookbook-r.com/Graphs/Plotting_distributions_(ggplot2)/ , scroll down to Histogram and density plots with multiple groups
I'm getting into seaborn for python and I have a quick question that I was not able to find an answer to. If I add jitter to a plot, does it actually change the fit values (such as r^2, p-value, etc) or is it just cosmetic for the plot's look?
Comparing for example sns.lmplot("size", "tip", tips, x_jitter=.15) from sns.lmplot("size", "tip", tips) at https://web.stanford.edu/~mwaskom/software/seaborn/tutorial/quantitative_linear_models.html
No, the regression is estimated on the original data; the jitter is applied to a copy of the data that is used to draw the scatterplot.