Matplotlib Tutorial 12 - more customization of colors and fills

preview_player
Показать описание
In this tutorial, we're going to cover some more customization, along the lines of colors and fills. Fills allow us to fill between points.

Рекомендации по теме
Комментарии
Автор

If you are following this tutorial you might be confused because unlike this video ebay's stock price never got higher than $30 at the moment.
(Well at least, I did :)
Since EBAY's split took place on July 20, 2015(2376 for 1000 split), If stock price of EBAY was 23.76 on this video, It is shown 10 for now. and you could adjust like.. ax1.set_yticks([0, 10, 20, 30])

Gohoylol
Автор

Hi
Im getting this error. Using python 3.7. Please help
Video: @7:44
ax1.fill_between(Time, hits, 2, where=(hits < 2), facecolour='r', alpha=0.3)

TypeError: '<' not supported between instances of 'list' and 'int'

lkarthik
Автор

You sir have helped me make my ichimoku cloud indicator with this tutorial . Many thanks

Legate-Jons
Автор

your laugh at "we'll see what happens" made me laugh too

sonjabeier
Автор

Thanks for your work, but I am wondering is there way to put 'where' condition inside plot()?

jooboojeff
Автор

Lots of great stuff in this video. Hope I can use it in my future projects.

mitchellfolbe
Автор

I have a question regarding the fill part:

Since I couldn't get the URLs to work, I'm doing this part of the tutorials with x and y lists, containing integers. Then, when I try to use the "where" argument in the following line:

ax1.fill_between(x, y, y[0], where=(y > y[0]), alpha=0.3)

I get this error:

TypeError: '>' not supported between instances of 'list' and 'int'

Does anyone know how to solve the problem? Thank you very much

Anatanomerodi
Автор

Instead of color fill is it possible to have line with 2 different color e.g. for condition closep > closep[0] line color should be green and for closep < closep[0] line color should be Red. If yes how to modify the code ? Thank you.

Aditya-okcc
Автор

I just tried it and you can now add labels to axis fill_betweens

kas
Автор

EBAY and TWTR are args for graph_data function (which contains the yahoo finance url, from where we get the data from).how did the output graph change for TWTR and EBAY?

saicy
Автор

how can ı find the set of data like this to make graphs ? Help

burakdal
Автор

How to change color of polygon line and fill after it has been plotted?

harshgawai
Автор

How can I fill an EYE kind of diagram. X axis goes from 0 to 31, Y axis has 2 values for every X. How do fill in between the y values to make the diagram look like an eye

anandmirji
Автор

I am getting a error while using fill_between.
I have some date values in x and floating values in y.
All other customization are working fine but when I type
ax1.fill_between(x, y, 0) is shows an error saying
Type Error: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

mayankagarwal
Автор

Today the code, for some reason, thinks that closep[0] is the last close insetead of the first. What can i do about this?

ludvigwitschel
Автор

how do you change the gradient of the line itself? Did you cover that in a tutorial?

Kezzineful
Автор

How do i make a python graph show on a webpage??

tvatabells
Автор

Keep making lessons for us man . Well done . = )

bojantottiz
Автор

set_yticks required the list to be floats, not ints. in case anyone else had this issue

kas
Автор

I'm doing this part of the tutorials with x and y lists, containing integers. Then, when I try to use the "where" argument in the following line:

ax1.fill_between(x, y, y[0], where=(y > y[0]), facecolor='g' alpha=0.3)



I get this error:
TypeError: '>' not supported between instances of 'list' and 'int'



I also tried to use where=any(t>y[0] for t in y) but it does not work!!


Does anyone know how to solve the problem

thilokeshjain