To set the axis limit, we use setp() function and to represent the object we use gca() function of pyplot module.To define x and y data coordinates, use arange() and sin() function of numpy.Import numpy library for data creation.Import matplotlib.pyplot library for data visualization.In this example, we use setp() function with ylim() function to set y-axis range. **kwargs: There are a variety of keyword arguments that can be used.obj: The artist object is represented by this argument.The following is the syntax: (obj, ,\*args, \*\*kwargs) To set the property on an artist object, use the setp() function in the pyplot module of the matplotlib package. Here we’ll learn how we can use setp() function for setting y-axis range using matplotlib. Read: Matplotlib 2d surface plot Matplotlib y axis range setp To display the plot, use plot() function.To set the y-axis limit, we use axis() method and we set xmin and xmax to None and ymin and ymax to -0.75 and 1.5 respectively.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |