Histogram on shared axis

Is it possible to have a figure with two-plots such that....

   f(x) is plotted against x on axis 1 (on the right)

   histogram of f(x) is plotted horizontally (on the right) sharing
the y-axis of axis 1

(sorry, this is proportional font, ascii art)

                        f(x)
                         ^
                          >
                          >
                          >
counts <-------- ---------> x

I want count=0 to be on the shared y-axis. Perhaps log of counts as
well...so normal histogram options.

Thanks.

   histogram of f(x) is plotted horizontally (on the right) sharing
the y-axis of axis 1

Typo:

   histogram of f(x) is plotted horizontally (on the LEFT) sharing the
y-axis of axis 1