- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Rishikesh Kumar Rishi has Published 1162 Articles
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To logscale plots with zero values in matplotlib, we can use xscale() and yscale() methods with "symlog" class by name.StepsSet the figure size and adjust the padding between and around the subplots.Plot two lists containing zero values using plot() method.Use yscale() method with "symlog" class by name.Use xscale() method with ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To create a legend for a 3D bar in matplotlib, we can plot 3D bars and place a legend using legend() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an esxisting figure using figure() method.Add an axes to the figure ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
5K+ Views
To plot a dashed line on a Seaborn lineplot, we can use linestyle="dashed" in the argument of lineplot().StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Use lineplot() method with x and y data points in the argument and linestyle="dashed".To ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To skip weekends in a financial graph in matplotlib, we can iterate the time in dataframe and skip the plot if weekday is 5 or 6.StepsSet the figure size and adjust the padding between and around the subplots.Create a dataframe with keys time.Iterate zipped index and time of a date ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
We can use annotate() method to place annotation outside the drawing.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Create a figure and a set of subplots using subplots() method.Use scatter() method to plot x and y data points using ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
2K+ Views
To plot a histogram for discrete values with matplotlib, we can use hist() method.StepsSet the figure size and adjust the padding between and around the subplots.Make a list of discrete values.Use hist() method to plot data with bins=length of data and edgecolor=black.To display the figure, use show() method.Examplefrom matplotlib import ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To plot only the upper/lower triangle of a heatmap in matplotlib, we can use numpy to get the masked 2D array and convert them into an image to produce a heatmap.StepsSet the figure size and adjust the padding between and around the subplots.Create a random data of 5×5 dimension.Use numpy.tri() ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
416 Views
To control matplotlib marker orientation, we can use marker tuple that contains a number of sides, style and rotation or orientation of the marker.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Make an array of 10 different rotations.Zip x, ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
We can use annotate() to place an emoji at the top of a bar.StepsSet the figure size and adjust the padding between and around the subplots.Make a list of frequencies and labels conatining emojis.Create a new figure or activate an existing figure using figure() method.Plot bars using bar() method.Use annotate() ... Read More
![Rishikesh Kumar Rishi](https://www.tutorialspoint.com/assets/profiles/318007/profile/60_254496-1615815423.jpg)
Rishikesh Kumar Rishi
1K+ Views
To give a border to a line in matplotlib plot function, we can call plot() function twice with varying line width.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot x and y data points where line width=10 and color=black.Again ... Read More