Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How about rotating the dates to be vertical, that makes them a bit more legible:</p> <pre><code>qplot(x = factor(Date2), y = value, data = app1_diskIO.M, geom = "bar", fill = variable, main = "DISK IO", xlab = "Date", ylab = "Disk IO") + opts(axis.text.x = theme_text(angl e =-90)) </code></pre> <p><img src="https://i.stack.imgur.com/FSnkV.png" alt="enter image description here"></p> <p>You could also <strong>reduce the font size</strong> (is that what you mean by scale?), but that doesn't make it any easier to read. To do this, add a <code>size</code> argument in the <code>opts</code></p> <pre><code>qplot(x = factor(Date2), y = value, data = app1_diskIO.M, geom = "bar", fill = variable, main = "DISK IO", xlab = "Date", ylab = "Disk IO") + opts(axis.text.x = theme_text(angle = -90, size = 5)) </code></pre> <p>To <strong>remove all tick marks and labels on X axis</strong> (so you're not displaying any dates, as you request, maybe you might use a graphics editor to put something else there?), try this:</p> <pre><code>qplot(x = factor(Date2), y = value, data = app1_diskIO.M, geom = "bar", fill = variable, main = "DISK IO", xlab = "Date", ylab = "Disk IO") + opts(axis.ticks = theme_blank(), axis.text.x = theme_blank()) </code></pre> <p><strong>UPDATE</strong>: To <strong>space out the x axis labels</strong>, say one every ten days, as you request, try this:</p> <pre><code>app1_diskIO.M$Date2 &lt;- as.Date(app1_diskIO.M$Date2) qplot(x = Date2, y = value, data = app1_diskIO.M, geom = "line", colour = variable, main="DISK IO", xlab="Date", ylab="Disk IO") + scale_x_date(breaks = "10 days") + opts(axis.text.x = theme_text(angle = -90)) </code></pre> <p>Which should give you:</p> <p><img src="https://i.stack.imgur.com/XtZzc.png" alt="enter image description here"></p> <p>Useful website with excellent instructions for doing this kind of stuff: <a href="http://wiki.stdout.org/rcookbook/Graphs/Axes%20(ggplot2)/" rel="nofollow noreferrer">http://wiki.stdout.org/rcookbook/Graphs/Axes%20(ggplot2)/</a></p> <p>The guide to the updates in ggplot2 0.9 is very handy too, with lots of good examples: <a href="http://cloud.github.com/downloads/hadley/ggplot2/guide-col.pdf" rel="nofollow noreferrer">http://cloud.github.com/downloads/hadley/ggplot2/guide-col.pdf</a></p> <p>Related question: <a href="https://stackoverflow.com/questions/9711067/need-to-create-a-stack-bar-chart/9711421#9711421">need to create a stack bar chart</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload