- 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
5K+ Views
To change the color of a single bar if a condition is true, we can make a set of values and a list of colors with red until the value is 2; else add yellow color in the list.StepsSet the figure size and adjust the padding between and around the ... Read More
Rishikesh Kumar Rishi
1K+ Views
To annotate each cell of a heatmap, we can make annot = True in heatmap() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a Pandas dataframe with 5 columns.Use sns.heatmap() to plot a dataframe (Step 2) with annot=True flag in the argument.To display the figure, ... Read More
Rishikesh Kumar Rishi
1K+ Views
To plot multiple Pandas columns on the Y-axis of a line graph, we can set the index using set_index() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a dataframe with Category 1, Category 2, and Category 3 columns.Use set_index() method to set the DataFrame index ... Read More
Rishikesh Kumar Rishi
376 Views
RendererFile typesDescriptionAGGPngRaster graphics − high-quality images using the Anti-Grain Geometry engineCairopng, ps, pdf, svgRaster or vector graphics − using the Cairo libraryStepsSet the figure size and adjust the padding between and around the subplots.Set the backend name as "Agg".Create a 5☓5 matrix array using numpy.Use imshow() method to display data ... Read More
Rishikesh Kumar Rishi
1K+ Views
To find the area between two curves plot in matplotlib, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Create x, c1 and c2 data points using numpy.Plot (x, c1) and (x, c2) using plot() methods.Fill the area between the two curves, ... Read More
Rishikesh Kumar Rishi
848 Views
To make the Parula colormap in matplotlib, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Create colormap data using numpy.Create a 'LinearSegmentedColormap' from a list of colors.Viscum is a little tool for analyzing colormaps and creating new colormaps.Use imshow() method to ... Read More
Rishikesh Kumar Rishi
3K+ Views
To set the size of the plotting canvas in matplotlib, we can take the following steps:Set the figure size and adjust the padding between and around the subplots. Use figsize 7.50 and 3.50 to set the figure size.Create x and y data points using numpy.Plot x and y data points ... Read More
Rishikesh Kumar Rishi
260 Views
To get the default Seaborn color palette, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Return a list of colors or continuous colormap defining a palette.Plot the values in a color palette as a horizontal array.To display the figure, use show() ... Read More
Rishikesh Kumar Rishi
3K+ Views
To add different font sizes in the same annotation method, we can take the following stepsMake lists of x and y data points where text could be placed.Initialize a variable 'labels', i.e., a string.Make a list of sizes of the fonts.Use subplots() method to create a figure and a set ... Read More
Rishikesh Kumar Rishi
2K+ Views
To load an image and show the image using Keras, we will use load_image() method to load an image and set the target size of the image to be shown.StepsUse load_img() method to load the figure.Set the target size of the image.To display the figure, use show() method.Examplefrom keras.preprocessing import ... Read More