Data Science · Matplotlib Which of the following statements about Matplotlib legends is true? A Legends are automatically generated for all plots B Legends are not supported in Matplotlib C Legends can be customized using the plt.legend() function Correct answer D Legends are only available for scatter plots MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.fill_between() function in Matplotlib? A To fill the area between two horizontal curves Correct answer B To fill the area between two vertical curves C To fill the area between two scatter plots D To fill the area under a line plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which function is used to add a shape to a plot in Matplotlib? A plt.shape() B plt.add_shape() C plt.plot_shape() D plt.add_patch() Correct answer MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.subplot2grid() function in Matplotlib? A To create a subplot grid Correct answer B To create a line plot C To set the subplot title D To display the plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the output of plt.pie([10, 20, 30])? A A pie chart with slices proportional to the given values Correct answer B An error C A scatter plot D A bar plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What function is used to add a colorbar to a plot in Matplotlib? A plt.colorbar() Correct answer B plt.add_colorbar() C plt.create_colorbar() D plt.show_colorbar() MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which of the following is not a valid Matplotlib colormap? A viridis B rainbow C hotpink Correct answer D inferno MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.imshow() function in Matplotlib? A To display an image Correct answer B To create a scatter plot C To create a histogram plot D To create a bar plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which function is used to add text to a plot in Matplotlib? A plt.text() Correct answer B plt.add_text() C plt.annotate() D plt.add_annotation() MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.tight_layout() function in Matplotlib? A To adjust the subplot spacing automatically Correct answer B To create a tight plot C To set the plot legend D To set the plot title MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which backend is commonly used in Matplotlib to render plots to a file or display them on screen? A Qt B GTK C Tkinter D Agg Correct answer MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.subplots() function in Matplotlib? A To create a single subplot B To create multiple subplots Correct answer C To set the subplot title D To adjust the subplot spacing MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.subplot() function in Matplotlib? A To create a subplot Correct answer B To set the subplot title C To display the plot D To create a legend MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the output of plt.plot([1, 2, 3], [4, 5, 6], linestyle='--')? A A line plot with dashed lines Correct answer B A bar plot C A scatter plot D An error MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What function is used to set the x-axis limits in Matplotlib? A plt.xlim() Correct answer B plt.set_xlim() C Both A and B D None of the above MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.bar() function in Matplotlib? A To create a line plot B To create a scatter plot C To create a bar plot Correct answer D To create a histogram plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which of the following is not a valid Matplotlib marker style? A o B x C + D / Correct answer MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.grid() function in Matplotlib? A To set gridlines on a plot Correct answer B To create a grid of subplots C To adjust the plot margins D To display the plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the output of plt.hist([1, 1, 2, 3, 3, 3, 4, 4, 5], bins=3)? A A histogram with 3 bins Correct answer B A scatter plot C An error D A bar plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What function is used to create a scatter plot in Matplotlib? A plt.scatter() Correct answer B plt.plot() C plt.bar() D plt.hist() MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which of the following statements about Matplotlib figures is true? A A figure can have multiple axes Correct answer B A figure can only have one axis C A figure is not necessary to create a plot D A figure cannot be saved as an image file MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.legend() function in Matplotlib? A To set the plot legend Correct answer B To create subplots C To adjust the plot size D To display the plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which of the following is not a valid Matplotlib color string? A red B green C turquois Correct answer D blue MCQSEXAM Show answer Read explanation
Data Science · Matplotlib What is the purpose of the plt.xlabel() function in Matplotlib? A To set the y-axis label B To set the plot title C To set the x-axis label Correct answer D To display the plot MCQSEXAM Show answer Read explanation
Data Science · Matplotlib Which of the following statements is true about Matplotlib? A It is only compatible with Python 2.x B It is primarily used for web development C It is an open-source library for creating static, animated, and interactive visualizations in Python Correct answer D It is mainly used for natural language processing tasks MCQSEXAM Show answer Read explanation