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
6
votes
2 answers
How do I connect the endpoint & startpoint of geom_line in a polar plot (coord_polar)?
I'm a bit stuck with getting the endpoint of a line in a polar plot to connect with the startpoint.
My data:
df <- structure(list(ri = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230,…

Jaap
- 81,064
- 34
- 182
- 193
6
votes
3 answers
How to plot vertical line in octave?
What it the best way to plot a vertical line using Octave?

Austin A
- 2,990
- 6
- 27
- 42
5
votes
5 answers
Elegant way to select the color for a particular segment of a line plot?
For a list of n pairs of coordinates x,y is there a way of plotting the line between different points on a specific color?
The solution I've implemented so far is not to use the plot function but lines selecting the range for which I want the color.…

pedrosaurio
- 4,708
- 11
- 39
- 53
5
votes
2 answers
How to make ggplot lines run to the edge?
I have data (depth over time) that I want to display with a line plot. For clarity, I want to zoom in on a section but still show the user that the data continues outside the bounds of the plot. So I want the lines to stop at the plot's edge, rather…

Corned Beef Hash Map
- 221
- 1
- 13
5
votes
2 answers
Line plot with average and shadow for min/max
I've made a quick example data frame for this below. Basically I want to create a line plot with the average value as a line and a shadow around that line representative of the range of the values. I realise I'll likely have to find row min/max but…

Darren J
- 503
- 2
- 5
- 16
4
votes
3 answers
How to create a geom_line plot with reversed (second) y-axis barplot in ggplot?
I am trying to plot a geom_line figure, combined with a barplot. The barplot will have a reversed y-axis. The final product is expected to be similar to the figure below. I am not sure how to combine the reversed barplot with the line plot.
Also, it…

Yang Yang
- 858
- 3
- 26
- 49
4
votes
1 answer
Seaborn lineplot - connecting dots of scatterplot
I have problem with sns lineplot and scatterplot. Basically what I'm trying to do is to connect dots of a scatterplot to present closest line joining mapped points. Somehow lineplot is changing width when facing points with tha same x axis values. I…

dtBane
- 91
- 1
- 6
4
votes
1 answer
How to create an individual line plot in between box plot in r
I'm trying to create a plot like this image below where the individual data lines are in between the box plots. Image to create in R ggplot2
The closest I am getting is something like this:
Image using ggplot2 but it looks a bit cluttered with the…

Erich
- 43
- 2
4
votes
1 answer
How to display all numeric legend values in seaborn
I am trying to create a sns.lineplot() for following dataframe:
overs:
season over total_runs total_overs avg_run
0 2008 1 703 745 0.943624
1 2008 2 923 741 1.245614
2 2008 3 …

Pratyush Saxena
- 55
- 5
4
votes
1 answer
How to plot smoothed line (ggalt::xspline) plot with x-axis as factor
I have the following data frame:
lp_dat <- structure(list(kmeans_cluster = c("1", "2", "3", "4", "1", "2",
"3", "4", "1", "2", "3", "4"), tc = structure(c(2L, 2L, 2L, 2L,
3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L), .Label = c("NT", "IBD+PBS",…

littleworth
- 4,781
- 6
- 42
- 76
4
votes
2 answers
"How to show the value of differences between two line's datapoint in Line-plot ?"
I have made a line plot now I want to show the value of differences/gap between two lines in the line plot within the figure.
I am not getting it how to show the gap value between the two lines.
Expected result:
My result:
dataframe:
My…

Avijit Saha
- 55
- 1
- 1
- 7
4
votes
1 answer
Change the color of the plot depending on the density (stored in an array) in line plot in matplotlib
I have a file with three columns, lets say, x y z. I need to plot x Vs y but I need to change the color of that (x,y) value depending on its density (stored in z column). I understand that I need to use color map and have to map the values of the…

Abhishek Sharan
- 41
- 2
4
votes
2 answers
Line plot with gray and black dotted lines
With the ggplot2 R package I made a line plot with 6 colored lines (referred to 6 levels of a factor), and I would like to change it in black and white, making 3 BLACK solid, dashed and dotted lines plus 3 GREY solid, dashed and dotted lines.
I try…

Elena
- 75
- 2
- 10
4
votes
1 answer
Multi-Axis Graph with Line on top
I'm attempting to make use of twinx() to create a bar/line combo graph with the line visible on top of the bar. Currently this is how it appears:
I also need the line chart to be plotted on the left vertical axis (ax) and the bar on the right (ax2)…

user2229838
- 199
- 1
- 12
4
votes
1 answer
matlab colorbar for lineplot colored by value
I have 2d line plot in matlab where each line is colored according to a value. I would like to add a colorbar showing the color that corresponds to these values.
I got a solution to plot the lines according to the value I want, however I can not…

MrOperator
- 231
- 3
- 11