Skip to main content

All Questions

1 vote
1 answer
68 views

reserve space for a legend in pyplot while fixing plot size and x-axis position

here are two of my plotting functions and example use: import matplotlib.pyplot as plt def set_legend(ax, item_count, title=None): legend = ax.legend( title=title, loc='upper ...
Moran Reznik's user avatar
  • 1,371
0 votes
1 answer
52 views

How to activate plt.show() when creating axes without pyplot in matplotlib?

I have a script like this which when executed opens up a new window with the figure. import matplotlib.pyplot as plt fig = plt.Figure() # ax = fig.add_axes(rect=(0.1, 0.0, 0.9, 1.0)) # does not open ...
Paweł Wójcik's user avatar
1 vote
0 answers
73 views

Why is there an offset between grey bars and width of arrows in upper limits

For the image shown below, which shows upper limits in red arrows between two variables X and Y and on the right side there is Z axis showing value of grey bars, why is their an offset between grey ...
Siddhant Manna's user avatar
-1 votes
1 answer
99 views

plotting wind direction from netcdf file using quiver

I am doing data visualization from netcdf file (weather data), i want to plot the wind direction as well but it is not working: ucomp=getvar(ncfile,'U10',timeidx=i) vcomp=getvar(ncfile,'...
Samman Amgain's user avatar
0 votes
1 answer
75 views

plot many signals together in python

I am trying to plot many signals (196) from a multielectrode dataset (https://zenodo.org/records/1411883). I want to plot something cool to see all registers together. I want to get something similar ...
GGChe's user avatar
  • 15
0 votes
1 answer
50 views

Plotting multivariable plot in seaborn using Pandas DataFrame

Reproducing the data frame as showed : dx = {'SEGM':[9, 8, 7, 6, 5, 4, 3, 2, 1, 0], 'YES':[4812, 2697, 2677, 1811, 1570, 1010, 418, 210, 115, 166], 'NO':[590, 1368, 2611, 2968, 3942, 3596, 2141, 1668, ...
Nabi Shaikh's user avatar
0 votes
0 answers
36 views

Error with the label plotting with seaborn.objects

I am having problems when I want to make a graph about public transport in Argentina, the label is displayed on the graph, what can I do to fix it? fig, ax = plt.subplots() ax.xaxis.set_tick_params(...
Fausto Martinez's user avatar
2 votes
3 answers
391 views

Manually set values shown in legend for continuous variable of seaborn/matplotlib scatterplot

Is there a way to manually set the values shown in the legend of a seaborn (or matplotlib) scatterplot when the legend contains a continuous variable (hue)? For example, in the plot below I might like ...
dfried's user avatar
  • 547
2 votes
0 answers
274 views

How to create a sorted/ranked area plot in Python? [closed]

I want to make a ranked/sorted/ordered stacked area plot in Python. This is sometimes also called a ribbon plot (because this is the name PowerBI uses) or a stream graph. Think of this as a continuous ...
Xtiaan's user avatar
  • 296
-1 votes
1 answer
522 views

How to properly plot a candlestick chart alongside trendlines but considering a y axis with percentage change values using MatPlotLib and Python?

When I was trying to compare 3 financial assets based exclusively on its price series, I realized that to do so all of those price series had to be converted to price change series, so that way, one ...
NoahVerner's user avatar
0 votes
2 answers
171 views

How to change the color of a single line plot based on another variable

I want to plot a line using the following equation. y = x(1+0.25ε) Where, x = {0, 1, 2, ..., 200} ε = np.random.randn() And i want to change the color of the plot based on slop. I.e it should be blue ...
imtiaz ul Hassan's user avatar
0 votes
1 answer
54 views

Gap between bars of the same year after each loop

I have a program/function that plots a graph like this - What I am trying to do is stack the bars of the same year side by side, then leave some gap in between, and then stack the bars of another ...
Prakket's user avatar
  • 15
0 votes
0 answers
129 views

Matplotlib plot function is not producing a sequential line

I am trying to produce a 2D plot using matplotlib's plot function, but the resulting plot is a bunch of lines connecting the points in an unexpected way (not sequentially from left to right). WHAT I ...
Fabian Leal Villaseca's user avatar
0 votes
1 answer
111 views

color points according to their position

I want to plot the latent vector of a variational auto-encoder model. The latent vector consists of eight individual values. Since every dimension represents a property, plotting them in a 2d plane is ...
user3748950's user avatar
0 votes
1 answer
66 views

Error parsing font string in matplotlib stylesheet

I want to use a custom font in my matplotlib plots. I would like to use path of the .ttf file in the stylesheet, for example: mathtext.it: "/path/to/fontname-Italic-VariableFont_wght.ttf" ...
darthV's user avatar
  • 402

15 30 50 per page
1
2 3 4 5
17