Plotting to get smooth curve

2225 views python-3.x

I have values in y axis = [20.0, 60.0, 1540.0, 13200.0, 18000.0, 60000.0, 200000.0, 300000.0]

x-axis from 0 to 200000

When I plot the graph it looks like the changes are not transient. Is there a better way of representation? Any suggestions please!

please refer to the image for my current result.

enter image description here

answered question

How you are plotting and what you are meaning with "changes very drastic"?

Please see the image attached. I want a smooth transient graph.

In the image there is no x axis which goes up to 200000. Please post which variables you use to plot using what command.

1 Answer


You can use log-scale for the y-axes.

Consider the following example:

y = [20.0, 60.0, 1540.0, 13200.0, 18000.0, 60000.0, 200000.0, 300000.0]
x = [0, 100,200,300,400,500,600,700]

fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(15, 6))
ax = axes.flatten()

#figure left

#figure right

enter image description here

posted this

Have an answer?


Please login first before posting an answer.