matplotlib tag

89 questions


1 answers
68 views
0
If you save the graph you created with matplotlib, it will turn white.

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...

2 years ago

1 answers
72 views
0
I want to use Python matplotlib to change the pattern of the horizontal bar graph.

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...

2 years ago

1 answers
73 views
0
To save a plot as an image in pylab

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 ...

2 years ago

1 answers
70 views
0
Can't I change the position of the chart description?

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...

2 years ago

1 answers
98 views
0
plot an exponential function with f = 10^n in matplotlib as y = x graph

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...


1 answers
64 views
0
I'm drawing a graph with matplotlib, but I can't draw a graph.

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...

2 years ago

1 answers
121 views
0
Generating a PNG with matplotlib when DISPLAY is undefined

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...

2 years ago

2 answers
52 views
0
Python regression code question.

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...


1 answers
69 views
0
I want to change the font size for matplotlib

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...

2 years ago

1 answers
64 views
0
Matplotlib Legend has two stars

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...

2 years ago
« - 8 - »

© 2024 OneMinuteCode. All rights reserved.