Learning for the first time - plot colours

I am learning this software for the first time as part of my university course. This is very simple but my lecturer is on union strike and not responding to emails and I have a submission deadline tomorrow so I'm panicing.

This is my code:
plot(LIMIT_BAL, BILL_AMT6, col=default)
to create a scatterplot of two variables that changes the colour of plots with default =1 not default =0 as I have been taught (not using ggplot2)

But it keeps changing the colour to white instead of red like it did in my lecture and I can't see the plots at all. I've tried everything on google to change the colour and its just not working. Can anyone help me?

  • A stressed student

Try col="red" or whatever color you want.

Thanks for responding
It wont let me use col=default and col=red in the same function

Why do you want to use col=default?

I am analysing credit card data. I need a scatter plot of the total balance against the Amount paid in the previous month and then the colour to change to indicate which of these have defaulted on payments in the following month (1 or 0) but it keeps changing them to white so I cant see them

The problem is 1 and 0 each mean a particular color. Change default so the codes are the colors you want. You can either look up what numbers correspond to what colors or replace default with a character vector like c("red","blue","red").

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.