1
$\begingroup$

I'm trying to plot an histogram of a set of data, I would like to use a bin of different width in x and y direction.

I've tried using the following two codes:

Histogram3D[data, {0.2, 0.098}, "PDF"]

and

Histogram3D[data, {{0.2, 0.098}}, "PDF"]

However the code is not working.

I know it's a basic question, but does anybody have any suggestion?

$\endgroup$
2
$\begingroup$

Tak a closer look at documentation:

data = RandomReal[1, {100, 2}];


Histogram3D[data, {{.2}, {.5}}]

enter image description here

The following bin specifications bpsec can be given:

{w} use bins of width w

(...)

{xspec,yspec} give different x and y specifications

ergo:

{{wx}, {wy}}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.