This is my goal: Plot the frequency of `y`

according to `x`

in the `z`

axis.

These are my problems: I have a two columns array (`x`

and `y`

) and need to divide `x`

into classes (p.ex. 0.2 ou 0.5) and calculate the frequency of `y`

for each class of `x`

. The plot should appear like a `x-y`

plot in the "ground" plan and the frequency in the `z`

axis. It could be like a surface or a 3D histogram. I tried to make it using the `hist3D`

function of `plot3D`

package but I don't know what I am doing wrong.

This is an example of what I am trying to do:

https://www.safaribooksonline.com/library/view/r-data-visualization/9781783989508/ch06s05.html

Thanks!!