Jupyter Sagemath horizontal scroll output - jupyter-notebook

I have a large matrix and when I print the matrix in Sage, the Jupyter notebook is wrapping the rows of the matrix, which makes visualizing the matrix very difficult. Instead, I want to enable horizontal scrolling. I've seen various solutions about changing the size of the container window, but this doesn't give me horizontal scrolling.

Related

How to remove image margins when plotting and exporting square image with R?

I'm trying to plot a square TIFF image (1024 x 1024), but it displays it as a vertically stretched rectangle. I've tried adjusting margins in plotRGB and utilizing par(mar=c(0,0,0,0)), but I can't get the plot and output to be a square even though R recognizes the raster as a square.
Does anyone have any advice on how to simply fix this issue? I've attached two images, one of the original image and one of the image when plotted/exported in R. The goal of my program is to use histmatch solely to adjust the saturation of the source image to that of a matching reference image. The exported image thus cannot be vertically stretched, and must have no margin.
Screenshot of original image
R display and export of image

How do I remove vertical scroll using DT library in R?

what I have right now
I am trying to display the first six observations of my data set, but since I have 79 variables the columns don't fit all in one line. I managed to add a horizontal scroll bar using the DT library (so now the output chunk is a table where the columns appear all on one line). The problem is that I now have also a vertical scroll bar which I don't want: as you can see in the image one needs to scroll down also to see all six observations. Is there a way to display the six rows and scroll to the right to see the 79 variables? i.e. can I keep only the horizontal scroll bar and remove the vertical?
edit: I solved it like this

Layout differences between Qt Designer and running program

I am trying to make a basic wireframe design before I add colours, etc. As seen in the two pictures below, the sizing of the layouts is very different in designer and when the program is run. I have tried changing the layout stretch but it has no effect.
Designer:
Running program:
You need to decide what should happen when the window is resized larger than the size shown in Qt Designer. Presumably, you don't want the "Logo" and "Date" rows to expand to take up the extra vertical space, and you don't want the "Modules" row to expand either. So the extra space will have to go at the bottom.
The simplest way to achieve that is to put an expanding spacer immediately below the "Modules" row, but inside the outer layout. This will push everything up against the top of the window, and only allow space to grow at the bottom.

wxpython not showing the entire grid

I have a wxpython csv reader. I am displaying results on a grid. The grid will take about half of my screen. I would like to display 100 rows at a time. I assign there to be 100 rows but I can not scroll to the bottom 50. I have proved that the rows are there by writing to the rows that I can not see then copying the whole column and pasting in excel. What I am expecting to see is a scroll bar that allows me to scroll to the bottom 50. I allowed editing of size of column. When I increase the height of the column, the scroll bar appears,but still only allows me to view the top 50 columns. (if user makes column height a inch bigger than normal, my scroll adds an inch) My best guess is there is something wrong with the way I am initiating/getting the best size of the combinations of sizers,panels,and the grid. I have cut out the code that not needed but the layout panel and box are my overall/main panel and box.
import wx.grid as grd
import wx
self.layoutPanel = wx.Panel(self)
self.layoutBox = wx.BoxSizer(wx.VERTICAL)
self.previewPanel = wx.Panel(self.layoutPanel)
self.previewBox = wx.BoxSizer(wx.VERTICAL)
self.resultGrid = grd.Grid.__init__(self, self.previewPanel,0)
self.resultGrid.CreateGrid(105,20)
self.previewBox.Add(self.resultGrid,0, wx.GROW)
self.resultGrid.SetSize(self.resultGrid.GetBestSize())
self.previewPanel.SetSizer(self.previewBox)
self.layoutBox.Add(self.previewPanel,0, wx.ALL)
self.layoutPanel.SetSizerAndFit(self.layoutBox)
self.layoutPanel.Layout()
The problem was nested somewhere in having 2 panels in side one another. This is normally "ok" to do but it is a little more complicated with the grid. I got rid of the previewPanel and previewBox completely and that solved the problem. However another problem was the FIT. The fit makes the panel as small as possible which is not what I wanted to happen. In code not shown I had re-sizes occurring and when I did this I had setSizeAndFit which took the scroll away. I changed it to setSize and the scroll bar stayed.

How to vertically align multiple tables or graphics in Lyx

What I wanted to do is that I had multiple tables and/or images of different heights and wanted them positioned on the page side by side, so that the tops of the objects were aligned.
I couldn't figure this out, it didn't matter whether I put these 'in-line' or in separate Boxes (Minipages) (that seemed to be aligned the way I wanted in the editor), in output Lyx always seemed to align these objects somehow around the center of their height and not the top.
Finally, (after several hours of googling and trying to figure this out) I have the answer, so I'm posting it below, because I hope someone like me will find it useful in the future.
The way I solved this is relatively easy.
For each image/table I created a Box (Minipage). In each Box I put, on the first line, Vertical Space (Insert -> Formatting -> Vertical Space) and set the size to 0 in. After the Vertical Space I inserted the graphic/table. This way, if you put several boxes next to each other (for example by setting their width to 25% page width, or whatever you desire), they will be aligned by the top in the output.
You can also do Ctrl+Space (to insert a 'protected space') and then Enter, which seems to work the exact same way.
Hope this helps.

Resources