/ Python And R Data science skills: 76 line with color alpha line style

Sunday, 18 February 2018

76 line with color alpha line style

https://vlrtraining.com/courses/python-data-science-beginner-tutorial 76 linewith,color,alpha,line style
In [1]:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 5, 11)
y = x ** 2 
%matplotlib inline
In [36]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y)
Out[36]:
[<matplotlib.lines.Line2D at 0xbbed4a8>]
In [5]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="red")
Out[5]:
[<matplotlib.lines.Line2D at 0x8e46ac8>]
In [37]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000")
Out[37]:
[<matplotlib.lines.Line2D at 0xba789b0>]
In [39]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,linewidth=2)
Out[39]:
[<matplotlib.lines.Line2D at 0xbd024e0>]
In [40]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,linewidth=40)
Out[40]:
[<matplotlib.lines.Line2D at 0xbda2198>]
In [41]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,linewidth=100)
Out[41]:
[<matplotlib.lines.Line2D at 0xbdc1390>]
In [21]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,linewidth=100,alpha=0.5)
Out[21]:
[<matplotlib.lines.Line2D at 0xa546780>]
In [23]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,linewidth=100,alpha=0.1)
Out[23]:
[<matplotlib.lines.Line2D at 0xa669668>]
In [42]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,lw=7,alpha=0.6)
Out[42]:
[<matplotlib.lines.Line2D at 0xbe012b0>]
In [43]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,lw=3,linestyle="--")
Out[43]:
[<matplotlib.lines.Line2D at 0xbe830b8>]
In [44]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,lw=3,linestyle="-.")
Out[44]:
[<matplotlib.lines.Line2D at 0xbf160f0>]
In [33]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,lw=3,linestyle=":")
Out[33]:
[<matplotlib.lines.Line2D at 0xbb0ff98>]
In [46]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,lw=3,linestyle="steps")
Out[46]:
[<matplotlib.lines.Line2D at 0xbf16978>]
In [47]:
fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.plot(x, y,color="#808000" ,lw=3,ls="steps")
Out[47]:
[<matplotlib.lines.Line2D at 0xcfce518>]

No comments:

Post a Comment