Line plot is a way to represent a series of data by plotting them on two- or tridimensional area and connecting respective data points with lines.
Questions tagged [line-plot]
391 questions
2
votes
1 answer
Add line plots to Facetgrid plot
I plotted a simple RelPlotusing Seaborn, which returned me a Facetgrid object.
The code I used is the following:
import seaborn as sns
palette = sns.color_palette("rocket_r")
g1 = sns.relplot(
data=df,
x="number_of_weeks",…

Mattia Surricchio
- 1,362
- 2
- 21
- 49
2
votes
2 answers
Using dplyr to average time series groups with individuals of different lengths
Consider dat created here:
set.seed(123)
ID = factor(letters[seq(6)])
time = c(100, 102, 120, 105, 109, 130)
dat <- data.frame(ID = rep(ID,time), Time = sequence(time))
dat$group <- rep(c("GroupA","GroupB"), c(322,344))
dat$values <- sample(100,…

Ryan
- 1,048
- 7
- 14
2
votes
1 answer
Customize lineplot marker size based on values of a column
I have a data like the following:
#df
df = pd.DataFrame({
'id': {0: -3, 1: 2, 2: -3, 3: 1},
'val': {0: 0.4, 1: 0.03, 2: 0.88, 3: 1.3},
'indicator': {0: 'A', 1: 'A', 2: 'B', 3: 'B'},
…

lll
- 1,049
- 2
- 13
- 39
2
votes
2 answers
How can I automatically highlight multiple sections of the x axis in ggplot2?
I have a line plot that tracks counts over time for multiple factors. A mock version of the data I am working with would be:
step factor count
1 a 10
1 b 0
1 c 5
2 a 5
2 b 10
2 c …

alepoptosis
- 75
- 6
2
votes
2 answers
Align x-axis ticks in shared subplots of heatmap and line plots using Seaborn and Matplotlib
Plotting a heatmap and a lineplot using Seaborn with shared x-axis, the ticks of the heatmap are placed in the middle of the heatmap bars.
Consequently, the bottom lineplot will inherit heatmap ticks position and labels, not reflecting the true data…

Nick Pucino
- 57
- 6
2
votes
1 answer
Line plot with error bars in which each line is a different group and multiple variables are in the x axis
I'm trying to create a line plot with error bars in R/Rstudio, in which each line is a different group (coded by one variable) and different continuous variables compose the x axis.
Taking the dataset diamonds as examples, it would be a multiple…

Fernanda Valerio
- 23
- 3
2
votes
3 answers
Creating multiple lines in lineplot in seaborn from dataset
I have a big dataset that I would like to plot as a line plot in seaborn.
My dataset is consisted of different measurments of specific plant that were taken in different data, so basically I would like to plot each row in my dataset as one line in…

Reut
- 1,555
- 4
- 23
- 55
2
votes
2 answers
Vertical line artefacts in 2D lineplot
I'm trying to create a 2D line chart with seaborn, but I get several artefacts as seen here, i.e. lines that suddenly shoot down or up with barely-visible vertical lines:
Excel on the other hand produces a correct visualisation from the same…

SebiH
- 669
- 1
- 8
- 18
2
votes
1 answer
Simple Gantt chart with R (plotting multiple lines)
I want to create a very simple Gantt chart with RShiny and ggplot2. I don't want to use packages or predefined Gantt charts like here. I rather want create the chart by plotting multiple lines one above the other and all parallel. It shouldn't be…

DerDressing
- 315
- 1
- 4
- 19
2
votes
2 answers
Why isn't the legend in matplotlib correctly displaying the colors?
I have a plot where I am displaying 3 different lineplots. I am thus specifying the legend explicitly to display 3 colors, one for each of the plots. Below is a toy example:
import matplotlib.pyplot as plt
for i in range(1,20):
if i%3==0 and…

Kristada673
- 3,512
- 6
- 39
- 93
2
votes
2 answers
Plot three-variable line chart
I need to plot a line chart that contains 2 lines, as per the dataset below:
I need each line of the chart to match the Technique. The values of X and Y are Release and Added respectively. The graph I need to generate is similar to the one in the…

Leomar de Souza
- 677
- 10
- 23
2
votes
1 answer
Overlaying box plot and line plot seaborn
I am trying to overlay a box plot (series of box plot based on another variable) and a line plot of medians of that variable, on the same box plot. A simple code like below works perfectly fine.
import pandas as pd
import numpy as np
import…

PagMax
- 8,088
- 8
- 25
- 40
2
votes
1 answer
Matlab GUI not showing line plot graph data
I'm working with my Matlab GUI file to play video and plot the mean value from the color channel (RGB). It has 2 axes, the first one for the video player and second axis for the mean graph, but the second axis is not showing any data, it just…

Mr. Nash
- 23
- 1
- 3
2
votes
2 answers
Altair interactive line plot, make line pop and highlighted when clicking icon on the right
I had been trying to make with some interactive plot using Altair on jupyter lab.
I had reached this stage where the results is below.
As you can see, the line doesnt pop to the front when its highlighted. How do I make it pop to the…

snookrun
- 245
- 3
- 9
2
votes
2 answers
How to plot a matplotlib line plot using colormap?
How can I create a lineplot using python matplotlib in such a way that the color of the line varies in respect of another series?
For a simple example:
import numpy as np
import matplotlib.pyplot as plt
t = np.arange(0.0, 2.0, 0.01)
y = np.sin(2 *…

JPM
- 469
- 1
- 7
- 12