How to modify inner style of violin plot in Seaborn Python - python

I'm plotting violin plot using seaborn.
but the color of mini box inside of each violin is arbitrary; black to gray.
I want to change the color of inner mini box as well as the line color of whisker.
Could you help me out?
Thank you in advance!

Related

Add dynamic color gradient as background to matplotlib bar chart

I have a bar plot figure of the below kind:
is it possible to use matplotlib to add a color gradient to the figure to match the predominant color of the bars, like so (approximation only):

Matplotlib: How to add effects to background color of a plot?

When making a subplot we use facecolor argument to set the color of the background. For example
import matplotlib.pyplot as plt
fig, ax = plt.subplots(facecolor="black")
ax.set_facecolor("black")
This produces the following output:
Now the above output is a plain black color. What I want is to add an effect to this plain black color so that it will look like this:
If you observe closely there is a bit of white color scattered over the black colored background. How to produce this effect in matplotlib?
I believe that only solid colours can be set. You could create the desired effect in a different program and save it as an image. Then, set the background of the plot to that image as in this SO answer.

Using plot and scatter on same figure with different colors but even if I plot first, the scatter still show up UNDER the plot

I am plotting a distribution of variables that are outputs from two different versions of a program. They look very similar (this is great because they should!) and I am showing their ratio in the same figure but on a different axis. My goal is to show the ratio as a scatter plot but with a horizontal line at y=1.0 to show 100% agreement. The issue I am having is even if I plot the line first and then the scatter, my scatter points still show underneath the line plot. (Please see the image linked below.) You can see the scatter in black underneath the line plot in red, even though I call the plot function first. Any recommendations? Thank you!
Distribution of two variables with ratio plot underneath

change violinplot stick color in seaborn

Id like to be able to change the color of individual sticks in seaborn's violin plot to highlight a specific datapoint. Any seaborn pros have ideas how to do this?

Having a colorbar for a bar plot in python

Hi I don't know if this is possible, but I have made a bar plot in python where the color is a hex value. If I have the value that a hex code corresponds to, is it possible to make a colorbar for my bar plot in python? Or is there a way to use a colormap for bar plots in python?
This is my image right now. The color corresponds to a value, and I want to add a colorbar that has a range of colors with the value it will be. I have done this for scatter plots but I did not use a color map but just hex values for each bar.
Matplotlib does support colobars. Here's the API:
http://matplotlib.org/api/colorbar_api.html
Here's a code sample of a colorbar associated with a plot:
http://matplotlib.org/examples/pylab_examples/colorbar_tick_labelling_demo.html
EDIT:
Specifically to a bar plot, you could use a LinearSegmentedColormap instead of a colorbar, as in here

Categories