0

I have a data that looks like this:

A1WWZ8  5.39
A1WY04  5.01
A1WT13  6.29
A1WWE5  4.06
A1WY97  5
A1WUX3  5.05
A1WUS2  5.42
A1WUV1  6.07
A1WZE7  4.96
A1WVE4  5.33
A1WVT8  5.16
A1WUI9  5.21
A1WZA9  5.37
A1WY16  5.9
A1WVW8  5.28
A1WZB0  5.46
A1WZI8  5.94
A1WUZ5  4.88
A1WWV3  9.65
A1WZT7  4.84
A1WZT3  5.08
A1WZT1  4.78
A1WZT4  5.55
A1WZT0  4.96
A1WZT5  5.08
A1WZT2  5.35

In this data table, I would like to use second column and prepare a line and point graph with values on x axis and factor levels on y (column 2 is a factor). With ggplot I am unable to draw line and point graph as it requires x and y axis data. With factors only bar plot is possible. The bar graph looks like this:

bar plot with a factor data

So the numeric values comes on x axis and levels goes on y.

Instead of this bar graph, is it possible to draw a line and point graph (multiple lines if I include multiple data together) using ggplot??????

codes:

hlpl <- read.csv("hlpl.csv", header=FALSE, sep=",")
qplot(hlpl$V3, data=hlpl, color=V3)

Thanx

novicegeek
  • 773
  • 2
  • 9
  • 29
  • I just did this: hlpl <- read.csv("hlpl.csv", header=FALSE, sep=",") qplot(hlpl$V3, data=hlpl, color=V3) – novicegeek Jul 16 '14 at 20:11
  • Post this in your question – David Arenburg Jul 16 '14 at 20:12
  • Your question seems a little unclear - are you trying to create a histogram that uses points rather than bars to represent factor counts? – nrussell Jul 16 '14 at 20:14
  • I just want to plot a line graph with points showing the numbers in column 2 of the data, where y axis shows the fraction or % of the number in the dataset. So Factor would be perfect for this kind of plot. But ggplot has no option, thats what I found so far, to plot a line graph with factor as an input data. – novicegeek Jul 16 '14 at 20:19
  • 1
    Is *this* closer to what you're looking for?: `plot(density(hlpl$V3))` – Steve S Jul 17 '14 at 09:06
  • indeed it works..but need to work a little bit on look. Thanx :) – novicegeek Jul 17 '14 at 09:36

0 Answers0