Hi,
I was trying to change the ticks on the x-axis to custom labels and
the width of each tick should be set depending on the dataset.
my dataset looks like this:
ID, Name, samplesize,group
0,B61,8,B
1,G12,1,G
2,B32,38,B
goes on like this for a few 100 lines ;)
and i tried this:
qplot(ID, samplesize, data=data, geom="line") +
opts(legend.position="none") + xlab("Class") + ylab("Sample Size") +
scale_x_discrete(labels=c("A","B","C","D","E","F","G","H"),breaks=c(10,20,30,40,50,60,70,80))
Now i have no ticks/labels at all. I would like the ticks to be where
the group 'ends'. The chart gets sorted by Name, so the group is
sorted as well (since it is the first character of the Name). But
somehow with the above I have no ticks at all.
And the second thing I couldn't solve: how can I get the labels
between the ticks? Since the group spans over several subgroups, it
would make way more sense to have the label of the x-axis between the
ticks.
I can't seem to be able to add a file, so I uploaded to imageshack:
http://tinyurl.com/39yzbhf
Any tips and recommendations appreciated, I am new to both R and
ggplot2 ;)
Thanks,
Thomas
ps: apologies for my previous posts, google rejected my post