colors

Scatter plot markers color based on custom scale

Scatter plot markers color based on custom scale Question: I want to color my scatter points based on a custom color scale but I got this error ValueError: ‘c’ argument has 150 elements, which is inconsistent with ‘x’ and ‘y’ with size 100. For the example below, it seems like the length of t needs …

Total answers: 1

change color according to the axis, matplotlib

change color according to the axis, matplotlib Question: In this graph I would like to make everything negative in x to be red, and in y to be green, or just the 3 most negative dots be red and 3 most positive dots be green. from matplotlib import pyplot as plt ex_x = [res1,res2,res3,res4,res5,res6,res7,res8,res9,res10,res11,res12,res13,res14,res15,res16,res17,res18,res19,res20,res21,res22,res23,res24,res25,res26,res27,res28,res29,res30,res31,res32,res33,res34,res35,res36,res37,res38,res39,res40,res41,res42,res43,res44,res45,res46,res47] ex_y …

Total answers: 3

Color 'print' in Python

Color 'print' in Python Question: Been going thru this: How do I print colored text to the terminal?. My issue is little different than those solutions (or I just can’t find it). I need to print two variables in different colors in same print statement. For example print("{0} {1}".format(test1, test2)) Should print ‘one’ in RED …

Total answers: 3

The button does not become the color I need

The button does not become the color I need Question: I have a button that changes color when the cursor hovers over it, and I want to make it so that when the button is pressed, it leaves the color that it has when the cursor hovers over it. There are my unsuccessful attempts to …

Total answers: 1

Python – color DF cell by hex value in cell

Python – color DF cell by hex value in cell Question: I have a data frame that contains hex values in two columns. I would like to visualize the hex value with color swatches either by coloring the cell itself or adding a column with a color swatch. Example table is below. hex1 hex 2 …

Total answers: 1

Changing the style of Sankey/Alluvial plot with different color palettes for categorical data

Changing the style of Sankey/Alluvial plot with different color palettes for categorical data Question: I am trying to change the color of Sankey/alluvial plot using Plotly. Fake data is available here import plotly.express as px fake = pd.read_csv(‘Fake.csv’) fig = px.parallel_categories(fake) fig.show() My ideal output – the same plot but colored with different colors based …

Total answers: 1

How to dynamically change color of selected category using dropdown box?

How to dynamically change color of selected category using dropdown box? Question: I am working on an app that takes in 2 inputs to update a scatterplot displaying the results of a cluster analysis. The first input filters the points on the graph through a time range slider. The second input is a dropdown box …

Total answers: 1