- 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
3K+ Views
To decrease the density of x-ticks in Seaborn, we can use set_visible=False for odd positions.StepsSet the figure size and adjust the padding between and around the subplots.Create a dataframe with X-axis and Y-axis keys.Show the point estimates and confidence intervals with bars, using barplot() method.Iterate bar_plot.get_xticklabels() method. If index is ... Read More
Rishikesh Kumar Rishi
4K+ Views
To remove the space between subplots in matplotlib, we can use GridSpec(3, 3) class and add axes as a subplot arrangement.StepsSet the figure size and adjust the padding between and around the subplots.Add a grid layout to place subplots within a figure.Update the subplot parameters of the gridIterate in the ... Read More
Rishikesh Kumar Rishi
2K+ Views
A simple call to the imread method loads our image as a multi-dimensional NumPy array (one for each Red, Green, and Blue component, respectively) and imshow displays our image on the screen. Whereas, cv2 represents RGB images as multi-dimensional NumPy arrays, but in reverse order.StepsSet the figure size and adjust ... Read More
Rishikesh Kumar Rishi
3K+ Views
To make matplotlib scatterplots transparent as a group, we can change the alpha value in the scatter() method argument with a different group value.StepsSet the figure size and adjust the padding between and around the subplots.Make a method to return a grouped x and y points.Get group 1 and group ... Read More
Rishikesh Kumar Rishi
3K+ Views
To align rows in a matplotlib legend with 2 columns, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Using plot() method, plot lines with the labels line1, line2 and line3.Place a legend on the figure with two columns. Use ncol=2.To display ... Read More
Rishikesh Kumar Rishi
2K+ Views
To map values to a colors tuple(red, green and blue) in matplotlib, we can take the following steps −Create a list of values from 1.00 to 2.00, count=10.Get linearly normalized data into the vmin and vmax interval.Get an object to map the scalar data to rgba.Iterate the values to map ... Read More
Rishikesh Kumar Rishi
3K+ Views
To draw a network graph with networkx and matplotlib, plt.show() −Set the figure size and adjust the padding between and around the subplots.Make an object for a dataframe with the keys, from and to.Get a graph containing an edgelist.Draw a graph (Step 3) using draw() method with some node properties.To ... Read More
Rishikesh Kumar Rishi
167 Views
To draw R-style (default is regular style) axis ticks that point outward from the axes in matplotlib, we can use rcParams["xticks.direction"]="out" for X-axis.StepsSet the figure size and adjust the padding between and around the subplots.Set outwaord tick points using plt.rcParams.Initialize a variable for the number of data points.Create x and ... Read More
Rishikesh Kumar Rishi
266 Views
To make width of title box span the entire plot in matplotlib, we can take the following 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 using plot() method, with color=black and linewidth=7.Get the ... Read More
Rishikesh Kumar Rishi
2K+ Views
To convert or scale the axis values and redefine the tick frequency in matplotlib, we can make a list of xticks and xtick_labels using xticks() method. Place the axis scale and redefine the tick frequency.StepsSet the figure size and adjust the padding between and around the subplots.Initialize a variable, n, ... Read More