Q:

R|ggplot2: unordered stacked bar graph

I have a data set that looks like this:
samp.data <- structure(list(Track = c(1,1,1,1,1,1,1,1,2,2,2), 
    Base = c("A","C","B","A","D","D","C","A","A","B","B"), 
    Length = c(1,1,1,1,2,3,1,1,1,1,1)), 
    .Names = c("Track", "Base", "Length"), class = "data.frame",row.names = c(NA, 11L))

#    Track Base Length
# 1      1    A      1
# 2      1    C      1
# 3      1    B      1
# 4      1    A      1
# 5      1    D      2
# 6      1    D      3
# 7      1    C      1
# 8      1    A      1
# 9      2    A      1
# 10     2    B      1
# 11     2    B      1

I am trying to plot an unordered stacked bar, with Tracks on the x axis and Length on the y axis. In other words, the bar graph wouldn't group the A bases together and plot it as one length of 1+1+1+1=4. It would plot each base in order. First it would plot the A base of length 1 in Track 1, C base of length 1 above that, B base of length 1 above that, A base of length 1 above that, D base of length 2 above that, and so on. 
Below is a crude ASCII diagram of what I am trying to describe: 
  |       C
L |       Y
e |       Y          Key
n |       R          A = Red
g | B     B          B = Blue
t | B     G          C = Green
h | R     R          D = Yellow
  ----------
    2     1
     Track

Sorry if the explanation is a little confusing. Thank you for your help!
Edit: This question is different from the possible duplicate, because I would like to ungroup the stacked sections.

A:

Just use geom_bar(stat='identity'), set your x to Track, your y to length - it all works out.
Note - I converted your Base to factor (makes sense), as well as your Track (also makes sense to me, but if you wish to keep it numeric that's fine. You may wish to add a + scale_x_discrete() then in order to have your tracks show up as whole numbers on the x axis).
samp.data$Base <- factor(samp.data$Base)
samp.data$Track <- factor(samp.data$Track)

ggplot(samp.data, aes(x=Track, y=Length, fill=Base)) +
  geom_bar(stat='identity') +
  scale_fill_manual(values=c('red', 'blue', 'green', 'yellow'))

The last line sets the colours as you please.
If you wish to reverse the x axis order (so that your track 2 appears first), do + scale_x_reverse().

I do not know what you mean by "ungroup the base" in your question, but say you wanted to draw an outline around each "chunk" of DNA you could add (e.g.) colour="black" in the geom_bar (e.g. in track 1, there is a D of length 2 immediately followed by a D of length 3 so it's drawn as a big D of length 5 - adding colour="black" outlines the 2-chunk separately to the 3-chunk though they still have the same colour).

