We then modify the x-coordinates from 0 to 6. Let say we have to create a plot of x-coordinates of 0 to 10 and y-coordinates be the cube of each of these x-coordinates. This limit the coordinates between these two values. These limit functions always accept a list containing two values, first value for lower bound and second value for upper bound. set_ylim() :- For modifying y-axis range.set_xlim() :- For modifying x-axis range.We can limit the value of modified x-axis and y-axis by using two different functions:. Setting axis range in matplotlib using Python But we want to modify the range of x and y coordinates, let say x-axis now extends from 0 to 6 and y-axis now extends to 0 to 25 after modifying. Let say we have to plot some graph in matplotlib which have x-axis and y-axis coordinate, let say x-axis extends from 0 to 10 and y-axis extends according to the relation between x and y. In this article we are going to understand how to set the axis range of any graph in matplotlib using python. In this article we need basic concept of some module of python such as “Matplotlib” and “Numpy”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |