I can’t change the color of a 2d line in seaborn. I have 2 lines in my plot and I want to assign different colors for both of them. But color=’red’ does not change the color, why? Answer You have a couple of options here. You can tweak your use of the color parameter, or you can use the palette
Tag: seaborn
Seaborn scatter plot from pandas dataframe colours based on third column
I have a pandas dataframe, with columns ‘groupname’, ‘result’, and ‘temperature’. I’ve plotted a Seaborn swarmplot, where x=’groupname’ and y=’result’, which shows the results data separated into the groups. What I also want to do is to colour the markers according to their temperature, using a colormap, so that for example the coldest are blue and hottest red. Plotting the
Prevent Sharing of Y Axes in a relplot
I’m having trouble getting seaborn’s relplot function to plot with different y axes on each row (while sharing x axes per column). I can see that both the FacetGrid and catplot methods in seaborn have a sharex/sharey keyword argument that would solve my problem, but I can’t find a similar one in relplot. Is there some way I can work
Seaborn Catplot set values over the bars
I plotted a catplot in seaborn like this I am getting an output like shown below I want to add the values of each bar on its top in K representation. For example in 2013 the bar for Michigan is at 48411 so I want to add the value 48.4K on top of that bar. Likewise for all the bars.
ModuleNotFoundError: No module named ‘seaborn’ in Python IDE
It checks the lib folder where my seaborn stuff is, but still error._. Hi, I have looked at other posts, but most seemed to be dealing with Jupyter notebooks, which I’m not. I was wondering how to get to use Seaborn in the basic Python IDE or in PyCharm. I read about filepath collisions stuff, but not too clear on
How to format seaborn/matplotlib axis tick labels from number to thousands or Millions? (125,436 to 125.4K)
How can I can change the axis format from a number to custom format? For example, 125000 to 125.00K Answer IIUC you can format the xticks and set these: The key bit here is this line: So this divides all the ticks by 1000 and then formats them and sets the xtick labels UPDATE Thanks to @ScottBoston who has suggested
Python Pandas Loop through Dictionary Keys (which are tuples) and plot variables against each other
I have a correlation matrix (in the form of a DataFrame) from which I return a Series which is the top n correlated pairs of columns and the value of the correlation: See this for an example of what I mean. I take the resulting Series object and then cast as a dictionary like so: The resulting keys of this
Is it possible to input values for confidence interval/ error bars on seaborn barplot?
I’m used to doing my barplots on seaborn and I like it’s layout for showing confidence bars, but I have a special case in a dataset where I already have the confidence interval, like this: Is there a way to manually input the values for seaborn confidence interval lines? Or to use it as “None” and use some matlib function
Seaborn Color Palette not working appropiate with lineplot
I’m having a little trouble with customizing my colors for a lineplot. I want to show an ensemble of spectras with a sequential color palette. The argument “palette=”blues” works fine, but does not accept any appropriate color lists (like “Blues_d”), which do not include any bright colors. Below you can see the code I’m using. The problem is, that I
Show correlation values in pairplot using seaborn in python
I have the below data: and I am doing a pairplot as below: However I would like to display the correlation coefficient among the variables and if possible the skewness and kurtosis of each variable. How do you do that in seaborn? Answer As far as I’m aware, there is no out of the box function to do this, you’ll