![]() This produces the row vector ydata, which contains 50 entries. We can pass it to the myquadratic function and get the function value at the given points. The xdata variable now contains a row vector with 50 entries, where the first value is equal to 1 and the last value is equal to 10. We can use the linspace function in order to produce 50 values in the interval. The myquadratic function squares the input argument x with the ”ˆ”operator. We begin by defining the function which is to be plotted. We emphasize the use of vectorized functions, which produce matrices of data in one function call. In this section, we present how to produce a simple x-y plot. linspaceĬonfigure the title and the legends of the current plotįigure 20: Scilab functions used when creating a plot. The functions presented in figure 20 will be used in the examples of this section. In order to get an example of a 3D plot, we can simply type the statement surf() in the Scilab console.ĭuring the creation of a plot, we use several functions in order to create the data or to configure the plot. The most commonly used plot functions are presented in figure 19. ![]() It can create x-y plots with the plot function, contour plots with the contour function, 3D plots with the surf function, histograms with the histplot function and many other types of plots. Scilab can produce many types of 2D and 3D plots. We finally export the plots so that we can use it in a report. Then we customize the title and the legend of our graphics. In this section, we present how to create 2D plots and contour plots. Scilab offers many ways to create and customize various types of plots and charts. import cv2 originalImage = cv2.imread('avalon_lake.jpeg') grayImage = cv2.cvtColor(originalImage, cv2.COLOR_BGR2GRAY) (thresh, blackAndWhiteImage) = cv2.threshold(grayImage, 127, 255, cv2.THRESH_BINARY) cv2.imwrite('blackAndWhiteImage.png', blackAndWhiteImage) cv2.imwrite('grayImage.Producing plots and graphics is a very common task for analysing data and creating reports.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |