Skip to content

Chapter-3,Visualization using Matplotlib,page-170(Legends) #38

Open
@Sarthak-Sunny

Description

@Sarthak-Sunny

plt.plot(x,y,'g',label='y=x^2')
plt.plot(x,z,'b:',label='y=x')
plt.legend(loc="best")
plt.title('Legend Sample')
While trying to exceute following code mention in your book, i am getting error as-
ValueError: x and y must have same first dimension, but have shapes (10,) and (50,)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions