1

I am working on digit recognition on 3 and 8. I have two sets of data, one set of test data and one set of training data. The datasets have the first column "label" which is either 3 or 8 and the other columns are all the different pixels. When I try to find the auc by using the function plot.roc, the error message keeps showing

Error in plot.new() : figure margins too large

I do not know where is the error. Anyone can spot the mistake here:

naive = naiveBayes(label ~., data=trainset, type="raw")
prediction.naive = predict(naive, testset, type = c("raw"))
plot.roc(trainset[,"label"], prediction.naive[,1], col="blue",
     lwd=3, print.auc=TRUE,print.auc.y = 0.3)
Uwe
  • 41,420
  • 11
  • 90
  • 134
Y L
  • 11
  • 2
  • 1
    Please look at this [Previous SO Post](http://stackoverflow.com/questions/23050928/error-in-plot-new-figure-margins-too-large-scatter-plot) – G5W Mar 31 '17 at 14:22
  • Perhaps you are trying to print the raw pixel data. can you print the two dataframe cols? trainset[,'label'] and predictions.naive[,1]? – netskink Mar 31 '17 at 15:12
  • Possible duplicate of [Error in plot.new() : figure margins too large, Scatter plot](http://stackoverflow.com/questions/23050928/error-in-plot-new-figure-margins-too-large-scatter-plot) – Uwe Apr 01 '17 at 04:10

0 Answers0