All Questions
Tagged with legend python-3.x
29
questions with no upvoted or accepted answers
1
vote
0
answers
959
views
Legend in an image generated by OpenCV (Python)
I'm plotting an image with the following code:
cv2.imshow('',I)
cv2.circle(I,tuple(xy),radius=1,c=(255,0,0),thickness=1)
cv2.circle(I,tuple(uv),radius=1,c=(0,0,255),thickness=1)
Is it possible to add ...
1
vote
0
answers
78
views
Matplotlib legend shows two same colors for a different data
I would like to make a function that generate plots for different dataset. My idea is to make list of bank for the function to generate each bank's credit growth or loan to funding ratio. However, ...
1
vote
0
answers
112
views
Matplotlib Legend and colormaps from panda dataframes
I am trying to plot some graphs with Python. Specifically I am working with dataframes. I would like to know how to do the next couple of things:
Adapt the legend of the plots using the correspondant ...
1
vote
0
answers
94
views
Legend for marker size
I'm trying to but legend for marker size in Sccater plot
there is some plot to describe what I want ( See Prediction Cost on the right )
Plot With Legend for marker size
I did all what I want ...
1
vote
1
answer
1k
views
How to create a legend instead of a colorbar for a multicolored scatter plot?
I want to add a legend instead of a colorbar to a scatter plot with multiple colors.
I am looking for something like this for a scatter plot.
My current graphic looks like this:
I was wondering if I ...
1
vote
0
answers
2k
views
Putting the legend outside the plot in pyplot and pandas
I am trying to get my legend outside the plot but some of its gets cropped.
My data:
Origin China India Pakistan Philippines United Kingdom of Great Britain and Northern Ireland
Year ...
1
vote
0
answers
420
views
Why does matplotlib's Interactive Navigation toolbar cause legend pickers to not work
We sometimes view a lot of system processes in comparison on a single chart.
I've created a mockup with matplotlib, as shown below.
Since there are so many data points, the legend is interactive with ...
1
vote
0
answers
40
views
How to set a legend which is prodcted in lineplot as the rowlabe of table
I have a series, and use ax.plot creat a line plot.Then I use ax.table add a table below the line plot.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
data = [4.6, 4.8, 4.7, ...
1
vote
0
answers
93
views
Optimize display for diagrams with matplotlib
I use Python 3.43 and Matplotlib 1.5.0.
I created a small example:
# -*- coding: utf-8 -*-
import matplotlib
matplotlib.use("Qt5Agg")
matplotlib.use("Svg")
import matplotlib.pyplot as plt
txts = ['...
0
votes
2
answers
149
views
How can I insert png symbol into web map legend with folium-python 3
This code is part of other big code that generate a web map with folium module:
legend_html = '''
<div style="position: fixed;
bottom: 40px; left: 50px; width: 100px; height: 110px;...
0
votes
1
answer
60
views
Unable to visualize legend correctly in matplotlib
I am trying to visualize this graph with a lineplot, but the legend is not working correctly as you can see in the image below.
The problems are three:
two rectangles appear in the second and fourth ...
0
votes
0
answers
210
views
How to map colors from multiple matplotlib subplot pie charts to a single figure legend
So I have been trying to get a legend working for a figure with multiple subplots that contain pie charts. The pie charts can contain any number of manufactures from a set list of manufacturers, but ...
0
votes
0
answers
387
views
Find best coordinates in PIL image for insert rectangular image
I edited this post in order to ask a more clear question.
Starting from a figure plot generate by Matplotlib like this :
Bitmap data is returned by a function:
from PIL import Image
from matplotlib ...
0
votes
0
answers
118
views
How to add a legend according to colors?
How to add a legend according to colors? I looked at this question, but I got an error about handles. What is wrong, please?
import matplotlib.pyplot as plt
import pandas as pd
fig, ax = plt.subplots(...
0
votes
0
answers
941
views
Fancybox is not working. What am I doing wrong?
I was following an example from Python Data Science Handbook which is plotting a simple graph. Its supposed to use fancybox on labels but it is not working as per the example.
The code is:
x = np....