How can I add a fixed point to a line of best fit? I am using y = {create col/linear regression={y=data}} with addplot to generate a line of best fit from data I'm pulling in from a file. How can I force the line to include the origin as a point it must pass through?  MWE:  \documentclass{article}  \usepackage{pgfplots}  \begin{document}     \begin{figure}[H]         \begin{tikzpicture}             \begin{axis}                 \addplot table [                     x = data1,                     y = {create col/linear regression = {y = data2}}                 ] {data_file.txt};             \end{axis}         \end{tikzpicture}     \end{figure} \end{document}
Linear regression with fixed point I have a data set to which I want to add a trend line. For my system, there will always be a fixed point on (2, 0). I have the line representing this system, but currently I do not account for the fixed point. Is there functionality to achieve this?  \begin{figure} \begin{tikzpicture} \begin{axis} [     ylabel={Some Time [ms]},     ]     \addplot[only marks, color=red, error bars/.cd,                        y dir=both, y explicit]         table [x=num_of_nodes, y=MyData, y error=stdev_delay_var] {MyData.dat};     \label{plot_one}     \addplot +[mark=none, dashed]          table[y={create col/linear regression={y=MyData}}]         {MyData.dat}; \end{axis} \end{tikzpicture} \caption{Test Results} \label{fig:test_results} \end{figure}
Intellisense in IntelliJ no longer working Do all accepted students in top-tier engineering programs get invited to interview before getting admitted? What adapter to mount a screw thread lens on Nikon D90? I have a Soligor 450 mm lens with a 40 mm dia camera body end thread connection.  I would like to try adapting it to a D90 AF system.  Are there adapter rings available out there for this purpose? Difference between int[] array and int array[] Best way to clone an installation (copying to identical hardware) Kind-of like  but slightly different (I think), in that I have 6 identical Acer Aspire Revo R3610 machines. One is (almost) configured to my requirements - when I'm done preparing it I'd like to make the other 5 machines absolutely the same. I'm very new to Ubuntu, what's the most straightforward (easiest) way of doing this?  The machines are going to live on different networks if that might otherwise be a problem (eg with Windows you can clone disks but you then have to make registry changes afterwards if they're going to run on the same network etc). The hardware in all 6 machines is, I stress, the same!  How can I efficiently clone one source image on to these identical machines?  Please restrict one software/solution per answer "I have never said" versus "I never said" ListPlot multiple datasets over same x-values Proving that $e^{\pi}-{\pi}^e\lt 1$ without using a calculator Prove that $e^{\pi}-{\pi}^e\lt 1$ without using a calculator.    I did in the following way. Are there other ways?  Proof : Let $f(x)=e\pi\frac{\ln x}{x}$. Then,  $$e^{\pi}-{\pi}^e=e^{f(e)}-{e}^{f(\pi)}\tag1$$ Now, $$f'(x)=\frac{e\pi(1-\ln x)}{x^2},\quad f''(x)=\frac{e\pi (2\ln x-3)}{x^3},\quad f'''(x)=\frac{e\pi (11-6\ln x)}{x^4}.$$ Since $f'(x)\lt 0$ for $e\lt x\lt\pi$, one has $f(e)\gt f(\pi)$. By , there exists a point $c$ in $(e,\pi)$ such that  $$\begin{align}f(\pi)&amp;=f(e)+(\pi-e)f'(e)+\frac{(\pi-e)^2}{2}f''(c)\\&amp;\gt f(e)+(\pi-e)\cdot 0+\frac{(\pi-e)^2}{2}\cdot \frac{e\pi(2\ln e-3)}{e^3}\\&amp;=f(e)-\frac{\pi(\pi-e)^2}{2e^2}\tag2\end{align}$$ because $f'''(x)\gt 0\ (e\lt x\lt \pi)$ implies $f''(c)\gt f''(e)$.  By the  and $(2)$,  $$e^{f(e)}-e^{f(\pi)}\lt (f(e)-f(\pi))e^{f(e)}\lt \frac{\pi (\pi-e)^2}{2e^2}\cdot e^{\pi}=\frac{e\pi(\pi-e)^2}{2}\cdot e^{\pi-3}\tag3$$  Since $e^x\lt \frac{1}{1-x}\ (0\lt x\lt 1)$ and $0\lt \pi-3\lt 1$,  $$e^{\pi-3}\lt\frac{1}{4-\pi}\tag4$$  From $(1)(3)(4)$,  $$e^{\pi}-{\pi}^e\lt \frac{e\pi(\pi-e)^2}{2}\cdot\frac{1}{4-\pi}\lt\frac{3\times\frac{22}{7}\left(\frac{22}{7}-2.718\right)^2}{2}\cdot\frac{1}{4-\frac{22}{7}}\lt 0.993\lt 1$$ Add a note about downvoting on Meta How can I check if a single character appears in a string? Does a percentage require a singular or plural verb, for example, do we say ten percent "go" or "goes"? Series of sequence with terms over series. Prove or give a counterexample to disprove the following statement about series of real numbers:  If $a_k &gt; 0, s_k = a_1 + \cdots + a_k$ and $b_k = a_k/s_k$ then $\sum a_k$ and $\sum b_k$ either both converge or both diverge. I have an UTF-8, polish text in .tex file. When I open it with my LEd (LaTeX editor), it shows ok (all characters can be seen). But when I try to compile it, I get error:  Package inputenc Error: Keyboard character used is undefined (inputenc) in inputencoding `utf8'.   I have to copy the text, cut it and paste to Notepad++, change (not convert!) encoding from UTF8 to ANSI (the polish characters will be missed and replaces with some random characters). Than copy it again and paste to LEd (in that editor, characters display bad also). But now I can compile my pdf and in it, the encoding is right again.  Is there a way to set encoding in the way I will see characters in LEd propertly and I will be able to compile it and I will get good characters in pdf?  The begging of my code:  \documentclass[12pt]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{amsmath,amssymb,amsfonts} \usepackage{txfonts} Dealing with non-integral powers on negative numbers If we are given an expression $(-8)^\frac26$, how do we solve it?  If it is $(-8)^\frac13$, we can find the cube root of -8 which is -2. However, if we square it first and find the sixth root, we get +2 (or maybe $\pm2$, which still isn't the same as just -2.  Also realised that when solving logarithmic and exponential questions, I had often made the assumption that if $b^a=b^c$, then $a=c$, either explicitly, or via some formula. I don't know if this is really true now.  So is there some convention by which we solve non-integral powers or is it just undefined to do so or something?  P.s. Talking of non-integral powers, will a quantity like $(-8)^{√3}$, will it be positive or negative. (Basically that's an irrational power now.) Using matplotlib in pygame In a bash script, how can I redirect all standard outputs to a log file and tee the output on the screen using exec ?  log_file="$HOME/logs/install.txt-`date +'%Y-%m-%d_%H-%M-%S'`" [ -f "$log_file" ] || touch "$log_file" exec 1&gt;&gt; $log_file 2&gt;&amp;1   This code redirect all the log to the log file but not to the screen . How do I force Excel (and other Microsoft Office products) to stop opening files in the same application? Whenever I "double click" on an Excel file and another Excel file is open, the newly opened file automatically opens in the same application window as the previously opened Excel file. This isn't limited to just Excel, as I've seen Word do this as well. This poses a problem when wanting to compare documents side by side.    The current solution I have for this is to actually open another Excel or Word instance, and then open the file from within that application window itself. Is there a way to force Office to open a new instance of the application when double clicking on the file icons?  I'm currently using Office 2007 and Windows XP, but I've seen this on Office 2010 and Windows Vista and 7. I'm looking for an overall solution if possible. Why was Severus Snape placed in Slytherin? The definition for marker below is from tcolorbox.doc.s_main.sty. With earlier versions of Texlive (and tcolorbox), this worked fine, but with updated Texlive, it does not.  \documentclass{article} \usepackage{xcolor,tikz,tcolorbox} \usetikzlibrary{shadows} \tcbuselibrary{skins,hooks} \makeatletter % from tcolorbox.doc.s_main.sty \newtcolorbox{marker}[1][]{enhanced,   before skip=2mm,after skip=3mm,   boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,   colback=yellow!50,   colframe=yellow!20!black,   sharp corners,rounded corners=southeast,arc is angular,arc=3mm,   underlay={%     \path[fill=tcbcol@back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);     \path[draw=tcbcol@frame,shorten &lt;=-0.05mm,shorten &gt;=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);     \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west);     },   drop fuzzy shadow,#1} \makeatother   \begin{document} \begin{marker}   Hylo! \end{marker}  \end{document}   This gives the following error  ! Package xcolor Error: Undefined color `tcbcol@back'.  See the xcolor package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.34 \end{marker}  ?   Why are tcbcol@back and tcbcol@frame undefined if they work in the code for the package's documentation? Alternatively, what are the correct names for the colours which were tcbcol@back and tcbcol@frame?  My version of tcolorbox is 2019-09-19. $a =\prod_{i = 1}^{r} p_{i}^{ai}$ with $a_{i} > 0$ for each $i$ is the canonical representation of $a$...