ipythonblocks icon indicating copy to clipboard operation
ipythonblocks copied to clipboard

color_show and ImageGrid don't render properly in Spyder or Ipython QTconsole

Open lwasser opened this issue 10 years ago • 7 comments

Hi All, this is an interesting bug. When i attempt to render a grid using ImageGrid, i get space where the grid should render in the console BUT no grid. Or i get a series of lines - one line for each cell with the appropriate assigned colors, however no actual cells. this issue is a bit baffling because it works perfectly in notebook. doesn't it all just use the ipython renderer?

for example, this code doesn't render: from ipythonblocks import ImageGrid grid = ImageGrid(5, 3) grid.show()

This code renders lines: row = ImageGrid(8, 1) row[0, 0] = (0, 0, 0) # no color => black row[1, 0] = (255, 255, 255) # all colors => white row[2, 0] = (255, 0, 0) # all red row[3, 0] = (0, 255, 0) # all green row[4, 0] = (0, 0, 255) # all blue row[5, 0] = (255, 255, 0) # red and green row[6, 0] = (255, 0, 255) # red and blue row[7, 0] = (0, 255, 255) # green and blue row.show()

Everything works perfectly in notebook so i understand if this is a notebook focused package! thank you Leah

lwasser avatar Dec 31 '14 17:12 lwasser

ipythonblocks is definitely browser oriented--the tables are rendered as HTML tables and include CSS styles.The Notebook is the only "supported" platform for ipythonblocks. But if anyone familiar with Spyder or the QT console would like the comment, the info would be welcome.

jiffyclub avatar Jan 02 '15 23:01 jiffyclub

Is there a "save as PNG" option?

gvwilson avatar Jan 02 '15 23:01 gvwilson

If you install from GitHub, yes. See the save_image function. I apparently forgot to make a release with that included.

jiffyclub avatar Jan 02 '15 23:01 jiffyclub

Do you have time to make a release that include save_image? Or can we ask @r-gaia-cs to do it? Thanks, Greg

gvwilson avatar Jan 02 '15 23:01 gvwilson

Should be able to make one today.

jiffyclub avatar Jan 02 '15 23:01 jiffyclub

@gvwilson New release of version 1.7.0 is up. https://pypi.python.org/pypi/ipythonblocks

jiffyclub avatar Jan 02 '15 23:01 jiffyclub

Thanks! G

gvwilson avatar Jan 02 '15 23:01 gvwilson