Found 34469 Articles for Programming

Linestyles in Matplotlib Python

Siva Sai
Updated on 18-Jul-2023 18:18:30

789 Views

A line's aesthetics in any line plot are influenced by the line style, also known as linestyle. The Matplotlib module for Python provides a wide range of line styles to improve the aesthetic appeal of plots. The use of line styles in Matplotlib Python is thoroughly covered in this article along with lucid and succinct examples. Understanding Line Styles in Matplotlib The pattern of the line that can be plotted is defined by line styles in Matplotlib. Solid, dashed, dash-dot, and dotted lines are some of the most popular line types. You may make your plots clearer and more informative ... Read More

How to Set Axis Limits in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 12:59:21

2K+ Views

MATLAB provides various built-in functions, such as xlim(), ylim(), and axis() that help us to adjust axis limits as per our requirements. In this tutorial, we will learn about adjusting axis limits of a plot in MATLAB. Functions to Set Axis Limits In MATLAB, there are three main functions widely used for adjusting axis limits of a plot. These functions are as follows: “xlim()” Function - The “xlim()” function is used to adjust X-axis limit of a plot in MATLAB. “ylim()” Function - The “ylim()” ... Read More

linecache.getline() in Python

Siva Sai
Updated on 18-Jul-2023 14:36:59

332 Views

Learning how to handle files effectively is essential for mastering Python or any other programming language. The Python language has the linecache module as a useful tool. It is an assistance module that makes it possible to read any line from any file while taking care of the technical aspects like caching, file I/O, and error handling. The linecache.getline() function, which can be a great tool in your Python programming toolbox, will be thoroughly examined in this article. Introduction to Linecache.getline() To extract a single line of text from a file in Python, use the linecache.getline() function. The caching feature ... Read More

Linear Search Visualizer using PyQt5

Siva Sai
Updated on 18-Jul-2023 14:36:17

98 Views

Understanding data structures and algorithms is essential for any prospective programmer because they are the foundation of computer science. This knowledge can be considerably aided by visualising these ideas. This post will demonstrate how to use Python's PyQt5 to develop a linear search visualizer. To gain a deeper understanding, we will go in-depth with developing a PyQt5 application and animating the linear search method. Introduction to PyQt5 A complete set of Python bindings for Qt libraries called PyQt5 makes it possible to build complex and feature-rich GUI applications. PyQt5 is extremely adaptable and works with a variety of operating systems. ... Read More

Linear Regression using Turicreate

Siva Sai
Updated on 18-Jul-2023 14:35:01

80 Views

Any data scientist or analyst must grasp linear regression because it is the foundation of predictive modelling. There are several libraries that can be used to implement this technique in Python, each with their own merits. TuriCreate, a machine learning toolkit offered by Apple, is one such library. It is simple to use, incredibly scalable, and effective. This article takes you on a thorough tour of TuriCreate's implementation of linear regression while utilising real-world examples to aid comprehension. Introduction to Linear Regression An approach to predictive modelling is linear regression. Based on one or more independent factors, it is used ... Read More

How to Create Logarithmic Scales in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 12:38:11

624 Views

MATLAB has three built-in functions "semilogx", "semilogy", and "loglog" to covert the linear axis scales to logarithmic scales in a plot. Here, the “semilogx()” function is used to change the X-axis scale to a logarithmic scale. The “semilogy()” function is used to change the Y-axis scale to a logarithmic scale. The “loglog()” functions changes both X-axis and Y-axis scales to logarithmic scales. Syntax semilogx(x, y); semilogy(x, y); loglog(x, y); The following MATLAB program demonstrates the use of “semilogx()”, “semilogy()”, and “loglog()” functions to change the axis scales to logarithmic scales in MATLAB. Example % MATLAB program to ... Read More

Finding the Last business day of Every Month in a Year using Python

Asif Rahaman
Updated on 18-Jul-2023 12:21:10

892 Views

Business days are known as working day in corporate sector, in some sector it is Monday to friday and in some they are Monday to Saturday. In this article we will understand how to find the last business day of every year using Python. Python offers various libraries like datetime, time, calendar etc to deal with the time operations. We will be utilizing those libraries to program the same. Additionally some libraries like Pandas also have in−built methods to support such time operations. Using The Datetime And Calender Module The 'datetime', and 'calendar' are standard Python modules to deal ... Read More

Converting Integer Data Type to Byte Data Type using Typecasting in Java

Way2Class
Updated on 18-Jul-2023 15:56:44

242 Views

In the Java programming language, the process of converting one data type to another is known as typecasting. At times, it becomes necessary to convert an integer data type to a byte data type. However, it is crucial to have an understanding of the byte data type's range. The byte data type is an 8-bit signed two's complement integer that has a minimum value of -128 and a maximum value of 127. If the integer value falls within this range, then it can be directly typecast to a byte variable. However, if the integer value is not within this range, ... Read More

Linear Regression Using Tensorflow

Siva Sai
Updated on 18-Jul-2023 14:34:32

323 Views

Introduction Predictive analysis makes heavy use of linear regression, a key idea in machine learning and data analysis. The top open-source machine learning framework TensorFlow offers powerful tools for putting linear regression models into practise. By using concrete examples, this article will guide you through the specifics of linear regression in the context of TensorFlow. Understanding Linear Regression By fitting the data to a linear equation, the predictive statistical technique of linear regression seeks to simulate the connection between a dependent variable and one or more independent variables. In essence, it uses historical data to anticipate the result for a ... Read More

How to Create Custom Axis Labels in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 12:30:12

321 Views

MATLAB programming has different built-in functions to customize the axis labels. In this article, we will explore the creation of custom axis labels of a plot in MATLAB. Functions to Customize Axis Labels MATLAB has the following built-in functions to create customized axis labels: "xlabel()" Function - The “xlabel()” function is used to apply label for X-axis in MATLAB. "ylabel()" Function - The “ylabel()” function is used to apply label for Y-axis in MATLAB. ... Read More

Advertisements