89 questions
I'd like to save a histogram created using matplotlib, but if you run the following program, The image is saved, but when I look inside, it turns white.Does anyone know the cause?import matplotlib.pyp...
I'd like to use Python's matplotlib to change the pattern of the horizontal bar graph.Currently, I can distinguish between red and blue, but I want to be able to distinguish between black and white.Sp...
I want to save the image instead of showing it at the end of the code below.I'm saving the screenshot nowPlease tell me how to save itfrom pylab import figure, axes, pie, title, show# # Make a square ...
I'm making a graph with about 20 dotsIt's annoying because the legend keeps coming into the graph.On a line that does not change the size of the axis or graph,I want to put the legend outside the grap...
The function f(x) = 10x is an exponential function, so if you just draw it, it looks like a curve, but you want to draw it in a straight line as if you logged it.xI've tried, but this is the limit I c...
ax1 = fig.add_subplot(2,2,1)After creating an object called ax1 like this, a = ax1.scatter(np.arange(30), np.arange(30)+3*randn(30))I drew a graph like this, but unlike the bar in the book, Graph is n...
You are about to use NetworkX on Python. This error occurs when you run the program below. Is there anything I missed?#!/usr/bin/env pythonimport networkx as nximport matplotlibimport matplotlib.pyplo...
from sklearn.datasets import load_bostonboston = load_boston()from matplotlib import pyplot as pltplt.scatter(boston.data[:,5], boston.target, color='r')import numpy as npx = boston.data[:,5]x = np.ar...
I don't know how to change the font size for labels or titles in matplotlib plotHow do you change the tick label?import matplotlib matplotlib.rc('xtick', labelsize=20) matplotlib.rc('ytick', labelsize...
I usually make it like this when I take only one dot in matplotlibfrom matplotlib.pyplot import *x = 10y = 100plot(x, y, k*, label=Global Optimum)legend()show()But when I did this, the star was marked...
« | - 8 - | » |
© 2024 OneMinuteCode. All rights reserved.