How can I modify how bars are displayed on a R barplot

I would like to plot 2 graphs of the same time serie, the first one would represent value, the second frequency of the same variable.

date   1  2  3  4  5  6  7 ...
value v1 v2 v3 v4 v5 v6 v7 ...
freq  f1 f2 f3             ...

The first graph is a usual plot, the second is a graphics::barplot, my problem is that I want the x-ticks to be on the same vertical line (after all it is the same date). It seems that barplot is centering the bars so any vertical line representing date is shifted (zoom on the graph bellow to see what I mean)

How can I arrange this ?


You could do it without using barplot(), but rather plot() with a different plot "type" argument. And do make sure that your x-axis values are the same.

An old example of mine is the Bollinger Bands plotting at the R Graph Gallery. It uses segments() for the volume bars.

Need Your Help

Does Raycast only work when the script is on main camera?

unity3d raycasting gameobject

I want to get the raycast work as a mouse (or Touch) from main camera, and when click, and hit on an object then it will trigger something. I have the script in the Object's update() as below:

AWT ActionListener as abstract class

java class awt abstract final

I have a program with a AWT GUI in Java. My problem is that I have a lots of abstract Classes (ActionListener) in this program. Within this abstract classes I need to call attributes from the main-...