Make more than one chart in same IPython Notebook cell

WebOrCode :

I have started my IPython Notebook with

ipython notebook --pylab inline

This is my code in one cell

df['korisnika'].plot()
df['osiguranika'].plot()

This is working fine, it will draw two lines, but on the same chart.

I would like to draw each line on a separate chart. And it would be great if the charts would be next to each other, not one after the other.

I know that I can put the second line in the next cell, and then I would get two charts. But I would like the charts close to each other, because they represent the same logical unit.

Rutger Kassies :

Make the multiple axes first and pass them to the Pandas plot function, like:

fig, axs = plt.subplots(1,2)

df['korisnika'].plot(ax=axs[0])
df['osiguranika'].plot(ax=axs[1])

It still gives you 1 figure, but with two different plots next to each other.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

More than one Audio object in a Jupyter (IPython) Notebook cell

Jupyter notebook, output more than one expression from cell

How to make Collection View cell more than one column?

Make a distribution plot with more than one values in the same graph

Make the select statement wait for more than one channel at the same time

Excel X Y (Scatter) Chart using more than one value per cell

make: more than one % in dependency

how to dynamically update a plot in a loop in ipython notebook (within one cell)

More than one badge on a cell - Angular Calendar

Is it possible to insert more than one image in a cell?

Is there a way to overlay an image on more than one cell?

How to use a defined datagridview cell more than one times in same datagridview

How to Write more than one data on same cell when export to excell?

Cufflinks Bubble Chart for more than one series

Using more than one time input in the chart

In VBA, I want to make an If statement for when more than one cell in a range contains a value

REGEXMATCH to match cell value in more than one other cell

ipython notebook background colour of a cell

IPython Notebook cell multiple outputs

Read cell content in an ipython notebook

IPython Notebook previous cell content

Is there any way to make more than one `Box` pointing to the same heap memory?

How to make a bot responding once if an user sends more than one photo at the same time?

How to make Listbox just show one value of more than 2 same values C#

Returning more than one variable in the same function

jQuery: more than one handler for same event

Using same VkPipeline with more than one VkRenderPass

Tabs are not working with more than one on the same page

More than one value in the same row MYSQL