I am learning Latex, and in an effort to increase my understanding, I decided to take all of my notes this semester in it. In my stats course, we did the classic M&amp;M color distribution thing, and I want to include a bar chart in my notes. Both of the methods I have tried give undesirable results.   If I do one plot, then they are all the same color, as in the first example I give.   If I do multiple plots, the spacing between is the bars is ridiculous. I have looked for commands to specify a list of colors, or shrink the spacing between plots, and come up empty.   CODE  \documentclass{report} \usepackage{pgfplots} \pgfplotsset{width=10cm,compat=1.9} \begin{document}  \begin{tikzpicture} \begin{axis}[     title = Number of M \&amp; Ms by Color,      ybar,     ymin=0,     ymax=30,     symbolic x coords = {Blue, Brown, Green, Orange, Red, Yellow},     xtick={Blue, Brown, Green, Orange, Red, Yellow} ] \addplot %Blue     coordinates {(Blue, 19) (Brown, 14) (Green, 27) (Orange, 18) (Red, 17) (Yellow, 17)};  \end{axis} \end{tikzpicture}  \begin{tikzpicture} \begin{axis}[     title = Number of M \&amp; Ms by Color,      ybar,     ymin=0,     ymax=30,     symbolic x coords = {Blue, Brown, Green, Orange, Red, Yellow},     xtick={Blue, Brown, Green, Orange, Red, Yellow} ] \addplot [fill=blue] %Blue     coordinates {(Blue, 19)};  \addplot[fill=brown] %Brown     coordinates {(Brown, 14)};  \addplot[fill=green] %Green     coordinates {(Green, 27)};  \addplot[fill=orange] %Orange     coordinates {(Orange, 18)};  \addplot[fill=red] %Red     coordinates {(Red, 17)};  \addplot[fill=yellow] %Yellow     coordinates {(Yellow, 17)};  \end{axis} \end{tikzpicture}  \end{document}   I would like something similar to this.
For the bar chart proposed, I would like to use different color for each single bar. How can I  do this?  \documentclass{article} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}   \begin{axis}[     title=Title,         xbar,         xmajorgrids = true,         bar width=6mm,          width=12cm, height=5.5cm,          enlarge y limits=0.2,         xlabel={\#number},         symbolic y coords={A,B,C,D},         ytick=data,         nodes near coords, nodes near coords align={horizontal},   ]    \addplot coordinates {(1,A) (7,B) (5,C)(2,D)}; \end{axis} \end{tikzpicture}  \end{document}
What would happen if the earth would stop spinning? How much heavier would we be? I mean absolutely stop spinning. How much does the centrifugal force affect us?  If you give technical answers (please do), please explain them in laymen's terms, thanks.  Edit: I am asking what would be different if the earth were not spinning. Nevermind the part about it stopping. Is it possible to transfer Minecraft PE worlds to Minecraft PC? I have a really cool Minecraft PE world, and I would like to also have it on my Computer. Is there a way to move a Minecraft PE world onto the PC Edition?  My tablet is Android and my Computer is Windows 7. Thanks! How many sequences of $n$ tosses of a coin that do not contain two consecutive heads have tails as the first toss? If you toss a coin $n$ times, there are $2^n$ possible sequences of heads and tails. Let $E_n$ be the set of sequences which do NOT contain two consecutive heads and $e_n$, the number of sequences in $E_n$.  Thus $E_3$ $=$ $\{$ $TTT$, $TTH$, $THT$, $HTT$, $HTH$ $\}$ and $e_3$ $=$ $3$.  How many elements of $E_n$ have $T$ as the first toss?  Please can anyone help me out here? Black flakes from new cast iron pan I bought a brand new Lodge 12" cast iron pan, washed it in soap and warm water and dried it with a paper towel thoroughly. Then I applied a thin layer of canola oil with a paper towel (paper towel was clean - not black after this application) and then heated the empty pan on my electric stove for 15-20 minutes. The oil on the pan smoked a bit, some parts of the pan turned slightly ashy (grey). Mostly everything looked OK.   After I turned it off and cooled the pan, I now take a clean paper towel and rub the surface and I see black flakes! What is this? Is this the oil broken down? Can I cook in the pan or wash it with soap to eliminate the black flakes? Once washed and dried should I rub canola oil again? This is my first experience with cast iron. Any pointers will help. How is Dru-Zod/General Zod still alive after this character died? Why we can't implement AES 512 key size? How to select (highlight) text in Skype chat without using a mouse? Recently I started learning to use keyboard shortcuts almost for everything I'm doing on the laptop, but soon enough after I started, I bumped into the problem of being unable to highlight (select) simple text in Skype chats.  I did some research and I couldn't find any solution to my problem. Have I missed an already answered question that is the same like mine or if not what solution can you suggest in order to achieve the results I want without touching mouse or touchpad or any cursor moving device? How can I get numbered classes on rows? I worked briefly with Drupal 7 and I thought it was possible there but in Drupal 8 is it possible to have a view output an increasing numbered CSS classes for Views rows?  This is what I want.  &lt;div class="view"&gt;   &lt;div class="view-row-1"&gt;&lt;/div&gt;   &lt;div class="view-row-2"&gt;&lt;/div&gt;   &lt;div class="view-row-3"&gt;&lt;/div&gt;   &lt;div class="view-row-4"&gt;&lt;/div&gt; &lt;/div&gt;   I know I can add a CSS class to every row and give every row the same class. In a modern SPFx Web Part, how do I check if a URL exists? Can I use a custom Splash screen? The default Splash screens are cool, but I'd like to add some of my own work to remind me of how awesome I am (no, not really).    Is it possible to customize/change the splash screen? Changing an element's ID with jQuery I need to change an element's ID using jQuery.    Apparently these don't work:  jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid"   I found out that I can make it happen with the following code:  jQuery(this).prev("li")show(function() {     this.id="newid"; });   But that doesn't seem right to me. There must be a better way, no? Also, in case there isn't, what other method can I use instead of show/hide or other effects? Obviously I don't want to show/hide or affect the element every time, just to change its ID.  (Yep, I'm a jQuery newbie.)  Edit I can't use classes in this case, I must use IDs. To run programs as sudo without password, I edited /etc/sudoers with wrong content.   Then I re-edited it with Mac's default text editor(course sudo cannot be used when /etc/sudoers is wrong).  I tried to run sudo agin, and get this error:   sudo: /etc/sudoers is owned by uid 501, should be 0 sudo: no valid sudoers sources found, quitting   What should I do? I cannot remember the root password (maybe I haven't ever set root password before). I am using ArcMap 10.1. The background: I have an .mxd that I intend to roll out across the company as our default template for all future maps/figure production. This .mxd contains two Data Frames; the first (&quot;Main&quot;) is larger (occupying almost the entire page) and is designed to be used to hold the majority of mapped data whilst the second (&quot;Inset&quot;) is much smaller and is to be used as an overview map. The problem: When choosing to import this new .mxd to an existing .mxd (using the Change Layout button on the Layout toolbar) the wizard automatically selects the smaller (&quot;Inset&quot;) Data Frame to occupy the larger part of the page. The screenshot below shows this interface with a red box indicating the two possible locations of each Data Frame:  Whilst it is possible to manually alter the order of the Data Frames using the Move Up or Move Down buttons, how do I change the default option for this setting (i.e. so that the &quot;Main&quot; Data Frame always appears in the larger space - &quot;2&quot;)? The reasoning is that I would like the process of using this new .mxd template to be as simple as possible, this is especially important as we have a wide range of users with varying abilities. Does anyone know how to choose/change this default setting? It does not appear to be in the Data Frame Properties &gt; Data Frame menu where I would expect it to be. QGIS query syntax differs between attribute table and feature filter Using QGIS 2.16.2, I can successfully select records from a shapefile attribute table using the following expression:  left("start_time", 10) = '2015-08-01'   Please note that start_time is a string field.  However, when I copy and paste the same expression into the shapefile's Layer Properties>General>feature filter>Query Builder I get the following error:    I would expect that the same expression would work everywhere in QGIS.  What am I doing wrong? Observed and Observable What is observed and what is observable? I found this two word frequently in the context of random variable and realization of random variable.  What is the difference between observed and observable? I've created a new user by using "User Accounts" in "System Settings". How do I grant rights so that this new user can have the same level of access as root? Redshift and conformal time What is the relationship between redshift and conformal time ?   For example in a paper i found:   taking $z_e = 3234 $ at the time of radiaton-matter equality yields the conformal time $\frac{\eta_e}{\eta_0} = 0.007$ and taking $z_E=0.39$ at matter-$\Lambda$ equality yields $\frac{\eta_E}{\eta_0}=0.894$ and setting redshift at decoupling $z_d=1089$ yields $\frac{\eta_d}{\eta_0} = 0.0195$  where $\eta_0$ is the present decoupling time.  Further some cosmological parameters are given as :  $\Omega_r = 8.36 \times 10^{-5}, \Omega_m = \Omega_b + \Omega_{dm} = 0.044 +0.226, \Omega_\Lambda = 0.73,  H_0=0.72$  Now how can i calculate all those $\eta_e, \eta_E, \eta_d, \eta_0$ from given redshift values and/or above parameters ? I searched whole of my text books trying to find an explicit relation for conformal time $\eta$ but all i got was $ \mathrm{d}t=a(t)\mathrm{d}\eta$. Any help would be very helpful. Creating intuition about Laplace & Fourier transforms How do you hide back faces so that you only see faces when its normal is facing the camera? When exporting it for use in a game, the face is rendered in only the direction of its normal, so this would be useful to have something similar. What's with the very slightly larger mass of the neutron compared to the proton?