Skip to main content

All Questions

Tagged with
1 vote
1 answer
115 views

R - How to change the color of line based on the value of Y-axis?

I am trying to change the color of a line in a line graph based on the Y axis value. My specific application: I am visualizing wind speed and direction. Ideally I'd do this with a rose plot, but I am ...
JMade's user avatar
  • 37
0 votes
0 answers
75 views

Why are the lines and points different colours on my line graph in r ggplot2?

I want the lines and points on my line graph to both be the same colour, organised by cell type according to the figure legend. For cell types 'M' and the 'EPC's the lines aren't the correct colour, ...
Jodie 's user avatar
1 vote
1 answer
393 views

Plot multiple line graphs on the same window with auto-assigned different colors

I want to create a vector of functions with two parameters where one parameter is over a continuous range of values and the other runs over a fixed number of numerical values saved in the column ...
reyna's user avatar
  • 173
2 votes
1 answer
146 views

Manually applying different colors in R ggplot

ggplot(data = s2[1:39,], aes(x=Month, y=Users, group=Year, col=Year)) + geom_line(size=1.3) + geom_point(size=4.5) + geom_point(size=4.0, color='#FFFFFF') + ggtitle("Seoul_year") + ...
YJP's user avatar
  • 67
3 votes
2 answers
17k views

How do I plot a line graph with dots for each data point using MatPlotLib in Python?

My desired outcome is a graph that looks like this ax.plot(df.x, df.y, 'b.-') where a line is generated with a dot at every location there is a data point. But I also want specific colors like "...
Bojan Milinic's user avatar
0 votes
1 answer
119 views

Altering thickness of line graph based on counts

Dataframe "id" has the columns year, id, and matriline, where each row is an incident. I wanted to count the number of incidents by matriline per year, so I did: events.bymatr = id %>% ...
burphound's user avatar
  • 175
0 votes
2 answers
2k views

How to colour background sections of graphs in R to indicate time periods of interest

I would like to add colour 'chunks' to the background of my graphs in R to highlight nesting periods. My x axis is in days, so I'd like the colours to be set 'from-to' certain days. I've created a ...
he90's user avatar
  • 37
2 votes
1 answer
2k views

Excel set color of line graph based on color of cells

So I have a set of data, see picture below. I want the color of the line graph to be the same as the background color of the corresponding row. The top 10 should be green, and the bottom 10 red in ...
Tim Johnsen's user avatar
0 votes
1 answer
258 views

How to fill the space between the grid lines with multiple colours in JpGraph?

So alternating two colours between grid lines using the SetFill function is simple enough, however, I need 7 different colours in my line graph. $graph->ygrid->SetFill(true,'red','blue', [5 ...
Jack's user avatar
  • 66
3 votes
2 answers
3k views

Changing the Color of Twin Axis Label Text in Bokeh

On a standard Bokeh line graph, the color of y-axis label text can be set with the code: graph.yaxis.major_label_text_color = "#1F77B4" It is possible to add a second y-axis to the graph, yielding ...
user10478's user avatar
  • 327
0 votes
1 answer
1k views

Matplotlib >1 Line Style, Same Line, Different Colors per Line

Given the following data frame and line graph: import matplotlib.pyplot as plt from cycler import cycler import numpy as np fig, ax=plt.subplots(1) d=pd.DataFrame({'a':[1,2,3,4], 'b':[...
Dance Party2's user avatar
  • 7,416
4 votes
1 answer
335 views

Amending colours of points and lines in ggplot R

Example code: library(ggplot) par(mfrow=c(1,1)) dates15=seq(as.POSIXct("2015-01-01 00:00:00"), as.POSIXct("2015-12-31 23:45:00"), by="15 min", tz="GMT") ex1=rnorm(35040, 150, 2) point=rep("Control", ...
sym246's user avatar
  • 1,856
1 vote
2 answers
2k views

DynamicDataDisplay D3 LineGraph color change

plotter is a DynamicDataDisplay.ChatterPlot variable. It adds a couple lines like following: LineGraph lgChA = plotter.AddLineGraph(dsChA, Colors.Red, 1, "Data"); LineGraph lgChB = plotter....
Nick Tsui's user avatar
  • 624