by Mike Weltevrede
Last Updated September 15, 2018 10:26 AM

I am trying to plot the function described below. However, when I do plot it, the x-axis shows 0 up to 1000, probably due to my definition of x0, instead of 0 up to 10. However, if I just use 1:10 as my x-values, the plot is not smooth at all. My question is: how do I set the x-axis to give me the real values that correspond to the function at that point?

PS: I have seen solutions where people replace the x-axis fully with their own values, but I am looking for a method that just uses the actual values of x.

```
eq <- function(x){
4*x^3 - 72*x^2 + 288*x
}
x0 <- seq(1, 10, by = 0.01)
plot(eq(x0),type='l',main="Plot of 4*x^3 - 72*x^2 + 288*x", xlab = "x", ylab = "4*x^3 - 72*x^2 + 288*x")
```

- ServerfaultXchanger
- SuperuserXchanger
- UbuntuXchanger
- WebappsXchanger
- WebmastersXchanger
- ProgrammersXchanger
- DbaXchanger
- DrupalXchanger
- WordpressXchanger
- MagentoXchanger
- JoomlaXchanger
- AndroidXchanger
- AppleXchanger
- GameXchanger
- GamingXchanger
- BlenderXchanger
- UxXchanger
- CookingXchanger
- PhotoXchanger
- StatsXchanger
- MathXchanger
- DiyXchanger
- GisXchanger
- TexXchanger
- MetaXchanger
- ElectronicsXchanger
- StackoverflowXchanger
- BitcoinXchanger
- EthereumXcanger