How to make a vertical line chart?


Eagle 81

Here is a small example of the data:

data <- read.table(header=TRUE, text='
height measurement temperature
h1  m1  24.5
h2  m1  24.0
h3  m1  25.0
h4  m1  16.0
h1  m2  22.0
h2  m2  25.0
h3  m2  23.5
h4  m2  17.0
h1  m3  23.2
h2  m3  24.2
h3  m3  23.0
h4  m3  16.9
 ')

library(ggplot2)

ggplot(data, aes(x=temperature, y=height, colour=measurement)) +
  geom_point(shape=19, size=2.5) +
  xlim(15, 30)

I want to make a vertical line graph. Something like this : http://i.stack.imgur.com/EeCrC.jpg

Any ideas?

Jamaican

You are almost there:

ggplot(data, aes(x=temperature, y=height, colour=measurement, group=measurement)) +
  geom_point(shape=19, size=2.5) +
  geom_path() +
  xlim(15, 30)

Related


How to make a vertical line chart?

Eagle 81 Here is a small example of the data: data <- read.table(header=TRUE, text=' height measurement temperature h1 m1 24.5 h2 m1 24.0 h3 m1 25.0 h4 m1 16.0 h1 m2 22.0 h2 m2 25.0 h3 m2 23.5 h4 m2 17.0 h1 m3 23.2 h2 m3 24.2 h3 m3 23.0 h

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to add vertical line to existing chart?

JLuc01 I'm trying to apply what I've found online, but I can't get it to work in my code. The x-axis is giving me some problems, I can't select an existing point on the x-axis on the chart (see highlighted row). The way I do this is to create a new x-axis with

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to draw a Google Line Chart with vertical dividers?

Courteney I have several Google line charts (actually combocharts with line and area charts inside) that need to have a vertical "before and after" marker like this: What should I do? I read in the documentation that I can customize a single point on the line

How to make a vertical chart based on input?

Stanley Town enter 1 1 3 1 output # # #### enter 0 3 0 4 5 output # ## # ## # ## # ## Here is my code so far.. #include <stdio.h> int main (void){ int height[80],length=0,max=0; while ((scanf("%d",&height[length++])) != EOF && leng

How to make the line on the chart thinner?

Alex Besides "borderWidth", is there any other property to make the line thicker or thinner in the line chart? I need to set the line chart to be thinner than the default, don't know how to do it Rays borderWidthis the only property you can use to make it thin

How to make the line on the chart thinner?

Alex Besides "borderWidth", is there any other property to make the line thicker or thinner in a line chart? I need to set the line chart to be thinner than the default, don't know how to do it Rays borderWidthis the only property you can use to make it thinne

How to make the line on the chart thinner?

Alex Besides "borderWidth", is there any other property to make the line thicker or thinner in a line chart? I need to set the line chart to be thinner than the default, don't know how to do it Rays borderWidthis the only property you can use to make it thinne

vertical line in bar chart

Renata Mesquita I have a dataframe called IAT that looks like this: dados = [["2019-10",20.59,"Glosa de 5%"],["2019-10",47.37,"Glosa de 5%"],["2019-10",78.12,"Glosa de 5%"],["2019-10",10,"Glosa de 5%"],["2019-11",15,"Glosa de 5%"],["2019-10",96,"Nenhuma Penali

vertical line on bar chart

this place How to add vertical line at 25 points. I tried using the add series method, but somehow I can't get the range I need for the row. I get a horizontal line at 25, but I need a vertical line. ActiveChart.SeriesCollection.NewSeries ActiveChart.Serie

vertical line in bar chart

Renata Mesquita I have a dataframe called IAT that looks like this: dados = [["2019-10",20.59,"Glosa de 5%"],["2019-10",47.37,"Glosa de 5%"],["2019-10",78.12,"Glosa de 5%"],["2019-10",10,"Glosa de 5%"],["2019-11",15,"Glosa de 5%"],["2019-10",96,"Nenhuma Penali

vertical line in bar chart

Renata Mesquita I have a dataframe called IAT that looks like this: dados = [["2019-10",20.59,"Glosa de 5%"],["2019-10",47.37,"Glosa de 5%"],["2019-10",78.12,"Glosa de 5%"],["2019-10",10,"Glosa de 5%"],["2019-11",15,"Glosa de 5%"],["2019-10",96,"Nenhuma Penali

vertical line on bar chart

this place How to add vertical line at 25 points. I tried using the add series method, but somehow I can't get the range I need for the row. I get a horizontal line at 25, but I need a vertical line. ActiveChart.SeriesCollection.NewSeries ActiveChart.Serie

vertical line in bar chart

Renata Mesquita I have a dataframe called IAT that looks like this: dados = [["2019-10",20.59,"Glosa de 5%"],["2019-10",47.37,"Glosa de 5%"],["2019-10",78.12,"Glosa de 5%"],["2019-10",10,"Glosa de 5%"],["2019-11",15,"Glosa de 5%"],["2019-10",96,"Nenhuma Penali

vertical line in bar chart

Renata Mesquita I have a dataframe called IAT that looks like this: dados = [["2019-10",20.59,"Glosa de 5%"],["2019-10",47.37,"Glosa de 5%"],["2019-10",78.12,"Glosa de 5%"],["2019-10",10,"Glosa de 5%"],["2019-11",15,"Glosa de 5%"],["2019-10",96,"Nenhuma Penali

C# line chart how to create vertical line

MOD I have a line chart. like this I want to draw a vertical line with a label at the bottom of it. I want the label to move its vertical line when I drag it above the x point of the chart. I will get the y points where the line with the labels matches the y a

How to draw vertical line in line chart in Kendo UI

Allen How to draw vertical line in line chart using Html5 and kendo UI? Can anyone help me with this problem? Mohit Pandey try this: // let chart be the id $("#chart").kendoChart({ categoryAxis: { notes: { line: { le

C# line chart how to create vertical line

MOD I have a line chart. like this I want to draw a vertical line with a label at the bottom of it. I want the label to move its vertical line when I drag it above the x point of the chart. I will get the y points where the line with the labels matches the y a

C# line chart how to create vertical line

MOD I have a line chart. like this I want to draw a vertical line with a label at the bottom of it. I want the label to move its vertical line when I drag it above the x point of the chart. I will get the y points where the line with the labels matches the y a