margins

R: calculating margins or row & col sums for a data frame

怎甘沉沦 提交于 2019-12-22 17:01:13
问题 I have a data frame that looks like this: Flag1 Flag2 Type1 Type2 Type3 1 A FIRST 2 0 0 2 A SECOND 1 9 0 3 A THIRD 3 7 0 4 A FOURTH 9 18 0 5 A FIFTH 1 22 0 6 A SIXTH 1 13 0 7 B FIRST 0 0 0 8 B SECOND 3 9 0 9 B THIRD 5 85 0 10 B FOURTH 4 96 0 11 B FIFTH 3 40 0 12 B SIXTH 0 17 0 I need to sum in such a way that my data frame finally looks like this Flag1 Flag2 Type1 Type2 Type3 Sum 1 A FIRST 2 0 0 2 2 A SECOND 1 9 0 10 3 A THIRD 3 7 0 10 4 A FOURTH 9 18 0 27 5 A FIFTH 1 22 0 23 6 A SIXTH 1 13 0

Remove white space (i.e., margins) ggplot2 in R

℡╲_俬逩灬. 提交于 2019-12-22 08:05:58
问题 I'm trying to plot a pie chart using GGPLOT2 in R. I want to do this in such a way as to omit the extra margin space. What I'm doing is similar to what sharoz did in this post here except I want to include a legend. Here is what I'm doing: ggplot(DATA, aes(x=factor(0),fill=factor(LABELS),weight=VALUES)) + geom_bar(width=1) + coord_polar(theta='y') + guides(fill=guide_legend(title='LEGEND')) 回答1: Assuming you are talking about the extra white space above and below the figure, the easiest

Extra padding or margin coming from where?

本秂侑毒 提交于 2019-12-21 21:05:43
问题 October Landing Page I'm having a couple issues on a page I'm developing. In the page above you'll see three boxes toward the bottom of the page - two are the same format and the third has it's own problems. Box 1 & 2 (the ones without borders) PROBLEM: somehow the list items have some extra left padding (apparently) that is not specified in the style sheet - at least not intentionally. Are they inheriting padding from elsewhere? Both boxes seem to be exhibiting this problem. Box 3 (the one

Java - JPanel with margins and JTextArea inside

吃可爱长大的小学妹 提交于 2019-12-21 07:16:33
问题 I want to create something like this: Main panel has its margins (x), and TextArea in the center of that panel which almost fills up the panel. At the bottom is another panel with custom size (height y), which can be toggled visible and unvisible with some shortcut. Bottom Panel has FlowLayout and few elements. The problem is I have no idea how to do this. BoxLayout has no margins. I tried with GridBagLayout but I doesn't work or I can't understand it enough :( I tried also with setting

Reduce left-margin in Visual Studio 2015

元气小坏坏 提交于 2019-12-21 07:01:01
问题 Please can anyone tell me how I can get rid of the margin at the left edge of the editor in VS2015? I don't mind the "indicator margin", but there is now a large space between that and the start of my code. In Tools-Options - Text-Editor - General - Display, I have the "Selection margin" turned off. Turning it on makes the gap even wider. I believe that the additional margin is used by the new "code assistance" light-bulb, which I would gladly turn off, but I cannot find an option for it. I

How to set margins 0 on print preview?

帅比萌擦擦* 提交于 2019-12-20 09:37:15
问题 Where am i doing wrong? This is the normal print preview: But I want to see this picture (without dragging margin arrows) This is the css codes and preview: 回答1: The best you can do is set @page margins. Keep in mind, however, that you can and most likely will be overruled if you set margins to 0. 回答2: Yes. It is possible to alter your margins in a page printout. The rule would look like: @page { margin: 0; } This will not work in Firefox as of now. If you check their developer reference on

how to remove the gap between subplots and around [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-18 12:36:30
问题 This question already has answers here : MATLAB subplot margin (3 answers) Closed 3 years ago . I am plotting two subplots (2x1) in one figure. I would like to remove all the spacing between two subplots and remove the xlable and xlabel ticks for the top subplot too. Also, I am trying to remove all the spacing outside the subplot. I try set(gca, 'LooseInset', get(gca,'TightInset')) But it doesn't work. Now I am removing those margins and labels manually, I have 60 figures need to be handled

margin on h1 element inside a div

岁酱吖の 提交于 2019-12-18 06:08:32
问题 I have a div container which has a h1 element within it: <div id="header"> <h1>Enlighten Designs</h1> </div> I have applied a margin-top,a margin-left and a margin-right to the header element. However the margin-top is not being applied to the header element box wrt to the containing div. Instead the top margin is being applied to the containing div. The left and right margins of the header are being applied to the header element box wrt the containing div. The style rules for the div and

Cross-browser Issue: Min-height and collapsing margins

家住魔仙堡 提交于 2019-12-17 19:53:38
问题 As you can see in this simple example: <div id="minheight"> <p id="margin">Paragraph with a margin</p> </div> <div id="sibling">Sibling div</div> #minheight { min-height: 100px; background: red; } #sibling { background: blue; } http://jsfiddle.net/peterbriers/B43th There is a difference between Chrome (35) and Firefox (29) in how it handles the collapsing margins on a block with a min-height that is larger than the child's margin . I tried to fully understand the specifications: http://www.w3

Android: How to set LinearLayout marging programmatically

拈花ヽ惹草 提交于 2019-12-13 06:17:13
问题 I've been trying to set margins for a programmatically created LinearLayout LinearLayout linearLayout = new LinearLayout(this); setMargins(linearLayout,20,20,20,20); private void setMargins (View view, int left, int top, int right, int bottom) { if (view.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) { ViewGroup.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) view.getLayoutParams(); final float scale = getBaseContext().getResources().getDisplayMetrics().density; // convert