Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_Histogram() - argument breaks is not treated correctly #54

Closed
RLumSK opened this issue Aug 25, 2017 · 0 comments
Closed

plot_Histogram() - argument breaks is not treated correctly #54

RLumSK opened this issue Aug 25, 2017 · 0 comments
Assignees
Labels

Comments

@RLumSK
Copy link
Member

RLumSK commented Aug 25, 2017

Summary

The additional argument breaks, passed via ... to the function graphics::hist is erroneously treated and if used leading to a wrong plot output. In particular, the argument breaks fails if a single numeric value is provided. However, according to the manual (?hist) the argument breaks allows for

one of:
a vector giving the breakpoints between histogram cells,
a function to compute the vector of breakpoints,
a single number giving the number of cells for the histogram,
a character string naming an algorithm to compute the number of cells (see ‘Details’),
a function to compute the number of cells.

Example

## load data
data(ExampleData.DeValues, envir = environment())
ExampleData.DeValues <-
  Second2Gray(ExampleData.DeValues$BT998, dose.rate = c(0.0438,0.0019))

## plot histogram the easiest way
plot_Histogram(ExampleData.DeValues, breaks = 5)

Traceback

Please check, amongst others, line 236:

    xlim.plot <- range(breaks.plot)

Possible solution

The automatic xlim values should not set using the manually set breaks, but the real one created by
hist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants