Questions tagged [function]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

Adding an arrow to the graph of a function

I'm making a thermodynamics PV graph to show how a cycle progresses and ideally I'd need to add arrows going along the blue line going left, the red going right and the green going up. But I cannot, ...
Emmannuelle_Legolas's user avatar
0 votes
0 answers
31 views

How can I add a 2nd picture on my cover page and have it slightly overlap the first?

I have been using and adapting my university's Latex template for a year now. I mostly manage by snooping around the code and reading the commented code. So far I've managed to adapt some shapes, ...
Nicolas Eveno EnfantNicolas's user avatar
0 votes
1 answer
52 views

Plotting a PV function graph

I'm trying to plot the following graph in LaTeX, but I cannot, for the life of me, find mathematical functions that work. This is my code and the following image is what I'm trying to achieve: \...
Emmannuelle_Legolas's user avatar
0 votes
1 answer
35 views

Soft clip not working for shaded areas beween curves

I've been trying to find a way to shade the area between the curves, but when I try coding in LaTeX with softclip, everything shuts down. I don't know what to do. This is my code : \documentclass[tikz,...
Emmannuelle_Legolas's user avatar
-1 votes
1 answer
66 views

Plot the graph of sin-cos functions using PSTricks [duplicate]

I have the following codes in Miktex+Texmaker using the configurations LaTeX+dvips+ps2pdf+View PDF: The following first figure (fig:cosine-plot) appears clearly: \begin{figure}[H] \centering \...
gete umbrey's user avatar
1 vote
1 answer
40 views

Omit border of a variation table using the tkz-tab package

Is there a way to omit the border lines in a sign and variation table of a function in the tkz-tab package? My Code: \begin{tikzpicture} \tikzset{h style/.style = {fill=red!50}} \tkzTabInit[lgt=1,...
vitalmath's user avatar
  • 123
1 vote
1 answer
67 views

Graphical representation of a function in a well-chosen orthonormal frame of reference

I want to create this exact picture in latex but I do not manage to find the code to do so.... This is my attempt: \begin{tikzpicture} \begin{axis}\[ axis lines=middle, axis line style={-...
vitalmath's user avatar
  • 123
1 vote
0 answers
60 views

How do I write the value of a function to a file?

What is the best way to write function values to a file from a tikz/pgf point of view? I've been using native TeX macros like \immediate\write\file, but maybe there's a way at the pgf level to do it ...
sergiokapone's user avatar
  • 5,578
3 votes
0 answers
77 views

Creating a function to obtain a sign table with zeros and non-existence points

I created a code to obtain a sign table. I've already tried existing solutions but I don't like them. I've almost reached all my goals but and the table I obtained is the following: This is a working ...
Muttley's user avatar
  • 31
1 vote
1 answer
77 views

Trying to plot using tikz

as usual I feel stupid because I feel that it should be easy but... well here I am... I want to plot this function using tikz : x/3.6 + (x^2)/155 So I tried this : \documentclass{scrartcl} \...
Kawahiem's user avatar
1 vote
1 answer
49 views

how can one plot an expression on pgfplots, which rounds a real number R to the nearest integer Z and computes a given series up to Z?

I have the following MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} \begin{figure} \begin{tikzpicture} \begin{axis}[% xmin = 0, xmax = 1, ...
Euclides's user avatar
0 votes
1 answer
43 views

\tikzpicture vs. axis vs. \pgfmathdeclarefunction vs. \tikzmath vs. \tikzset vs. \def\func

we can declare a function in the tikzpicture options, in \axis option, in \pgfmathdeclarefunction, in \tikzmath, by using \tikzset, by using the \def\func, etc... That is confusing as hell (at least, ...
Rubem Pacelli's user avatar
1 vote
1 answer
34 views

How to change \x in a function declaration and still plot it?

I can plot the following MWE \documentclass[beamer,crop]{standalone} \usepackage{times} \usepackage{pgfplots} \usepackage{physics} \pgfplotsset{ nice_axis/.style={ xlabel={$f \cdot T_c$}, ...
Rubem Pacelli's user avatar
0 votes
1 answer
51 views

Colour command showing side effect upon subsequent text [duplicate]

I introduced colour to a QED command, but the colour has side effect on the text that follows it. I want the colour to be restricted to the symbol only. \documentclass[a4paper,12pt]{article} \...
Celest's user avatar
  • 1
-1 votes
2 answers
63 views

Plotting functions with tikz [closed]

I would like to be able to plot standard function in Tikz, for a document in LaTeX I'm writing. So far, I tried and I used this piece of code \begin{tikzpicture} \draw[->] (-5, 0) -- (5, 0) node[...
Heidegger's user avatar
0 votes
0 answers
57 views

Blank lines between code sections [duplicate]

Have seen that strange things start to happen as soon as one introduces blank lines between code sections. For instance, take the synopsis for \NewDocumentEnvironment \NewDocumentEnvironment{<...
user avatar
0 votes
1 answer
74 views

Generating variants

Does the following command just add an additional name for the function ? Would the arguments be identical to the original function ? \cs_generate_variant:Nn \feuds_newteorema_simple:nn { VV }
Veak's user avatar
  • 1
0 votes
1 answer
125 views

Defining new functions using parameter text and using the signature [closed]

Have been reading the expl3 document interfaces3.pdf to understand how to declare and use functions. Although I have understood that there are three main methods (new, set, gset) where each method ...
Veak's user avatar
  • 1
0 votes
1 answer
193 views

Defining functions

In LaTeX, one can declare functions in documents using the \newcommand or \newenvironment commands. Here's how one can define a simple function and an environment. \newcommand{\myfunction}[2]{...
Veak's user avatar
  • 1
2 votes
1 answer
136 views

Protected Restriction

Have seen \cs_new_protected:Nn \feuds_newteorema_define:nn Is this just a definition of a function named \feuds_newteorema_define (taking two arguments as far as I can tell), Or is it something else ?...
Veak's user avatar
  • 1
1 vote
1 answer
92 views

Defining functions in Latex3

Could I have some explanation. For instance, What are these Nn and nn about. Very cryptic syntax. \cs_new_protected:Nn \piston_newteorema_define:nn { \NewDocumentEnvironment { #1 } {D(){#2}} ...
Veak's user avatar
  • 1
-1 votes
2 answers
75 views

How to draw long aligned arrows like this when defining functions?

I think it must be some special environments, but I can’t find it. This system also works on longer sequences, so I guess it might be dependent on some diagrams-drawer just like tikz This could be ...
user avatar
2 votes
2 answers
106 views

Fill between f(y) and f(x) functions

I want to fill the area between an f(x) functions and an f(y) function. This is what I have so far: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz,bm} \usepackage{...
PlutoDust's user avatar
7 votes
1 answer
116 views

Passing integer expl3 variables to a Lua function (via \lua_new:e)?

Given the following MWE: \documentclass{minimal} \ExplSyntaxOn \int_new:N\g_test_myint_int \int_set:Nn\g_test_myint_int{2} \cs_set:Npn\__test_dostuff: { \lua_now:e{tex.sprint(1)} % Works just ...
Chris W's user avatar
  • 73
3 votes
1 answer
54 views

How to draw a function on a section of a plot

I want to draw the blue "Gaussian" (approximated using sinc) on the black line going through the bullet point exactly like how it rests on the actual axis with its center above the bullet ...
Ahsan Yousaf's user avatar
1 vote
0 answers
36 views

figure TIKZ with a parition of a rectangle [duplicate]

I wanna create a standalone tikz file of : It is a partition into sets with smooth boundary and each set has a color either red or green. This is what I ve done so far (with circles): \begin{...
hanava331's user avatar
0 votes
1 answer
77 views

Recursive function

I need to determine a nth derivate of a given function using the code below, inspired in the recursive function. \documentclass[tikz,border=5mm]{standalone} \usepackage[utf8]{inputenc} \usepackage{...
Angelo Aliano Filho's user avatar
0 votes
1 answer
53 views

Translate curve horizontally

I drew this curve with pgfplots \documentclass[12pt]{article} \usepackage[margin=1.5cm,top=1cm,headheight=16pt,headsep=0.1in,heightrounded]{geometry} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \...
user3713179's user avatar
1 vote
1 answer
52 views

Problema in tikzmath with two outputs

I haver a MWE where I want to calculate a sum and the associated error, implemented in the funcion serieF. How can I implement in the function to return two outputs, i.e., the variables \s and \e and ...
Angelo Aliano Filho's user avatar
2 votes
1 answer
108 views

commenting out a single word from a line

I have not got any solution after a few try. In latex, how we can comment out a single word from a line. I mean for example Hello %this is so on it comments out this and the rest of the line as well. ...
Tanmoy Pati's user avatar
-2 votes
2 answers
94 views

write mathematical definition of functions [closed]

Can someone help me write these 4 lines?
B612's user avatar
  • 153
0 votes
0 answers
51 views

How do I make the brackets $\{\}$ appear automatically in a function that I personally defined?

I'm currently writing a big paper and I defined a lot of function to save time, most function are in the math mode (I don't really know if that's important). My question, that while using overleaf, ...
HitMan01's user avatar
2 votes
0 answers
79 views

Graph of a log function using TikZ/pgfplots package with a vertical slope is missing data [duplicate]

I have a problem using the TikZ/pgfplots package in LaTeX. I need to graph a function like this: $y=-\log_{10} (0.5\cdot (-x+\sqrt{x^2+4 \cdot 10^{-14}})$ And I have been using this code without ...
Juan Michalowski's user avatar
0 votes
1 answer
73 views

expl3 / setlength not working in preamble with expl3

I am writing a package that should output typographic sizes. For example the absolute character height, the x height, average character width,... These should be available in the preamble. \...
alexBer's user avatar
  • 33
2 votes
1 answer
244 views

Function model in LaTeX

I want to make a simple function model like in the picture. How would I do that? The docs of tikz-uml don't really help in this case.
SlothOnCrack's user avatar
2 votes
2 answers
109 views

expl3 / set length to average charwidth

I have a function that calculates the average character width. The function calculates the width as expected, but I can't use it in setlength. I've tried around and tried solutions I've googled, but I ...
alexBer's user avatar
  • 33
2 votes
1 answer
138 views

figure TIKZ with a trajecotry visiting regions

I want to create the following figure with tikz with a green backgroud. This is what I ve done so far (with circles) \begin{tikzpicture} \draw (-4,-1) rectangle (4,4); % E \draw (0,0) ++(45:2) circle ...
BrianTag's user avatar
  • 264
1 vote
1 answer
89 views

Plotting saw-tooth functions with varying heights

I am preparing a note on example of an everywhere continuous nowhere differentiable function. The construction involves a saw-tooth function, viz., h in the following way: I want to plot the ...
Subhajit Paul's user avatar
0 votes
1 answer
135 views

How to type "function space" in Latex

In learning basic function space ,I met some special symbols. They are not \mathcal,\mathscr. I'v tried to search special greek symbols or math symbols but failed.
Haonan Yu's user avatar
1 vote
1 answer
65 views

Trisectrix of Maclaurin

A workin parametrization of the famous curve is as in the code. Desmos correctly draw it but Tikz fail. How it is possible? \begin{tikzpicture}[scale=1] \draw[->](-.5,0)--(3,0); \draw[->](0,-2)--...
yngabl's user avatar
  • 448
3 votes
2 answers
230 views

How are \DeclareMathOperator and \operatorname different from the \def family and \pgfmathsetmacro? [duplicate]

LaTeX has so many similar yet different ways of creating new macros/commands/functions and it is quite confusing. How do \DeclareMathOperator and \operatorname differ from other common definition ...
aste47472's user avatar
0 votes
0 answers
72 views

Graph of an advanced function (hard level)

I have to do on overleaf the graph of this function: fo is =1. "w" is the variable and it's=angle/T so we don't need to know T. The final graph is: N.B. When w=0 G(w) it's = Tfo because we ...
FrancescoF96's user avatar
1 vote
2 answers
115 views

pgfplots fails to graph the function [sin(x)]^100

The image shows that the graph of [sin(x)]^100 (in red) lies below the x-axis in four small intervals, as the function is non-negative its graph should be on or above the x-axis. So there is an error ...
Benaia Sobreira de Jesus Lima's user avatar
2 votes
1 answer
194 views

Save function inside macro for the function’s derivative

My intent is to plot the first derivative of a function, following this approach: f'(x) = (f(x + dx) - f(x))/dx. Mine is a bit of a long function, so I would like to know if it is possible to save it ...
user3713179's user avatar
0 votes
0 answers
79 views

How to write in LaTeX a function that breaks at one point?

I have to use this command in solving questions for an app. I am in my training period and this was not the part of the tutorial. My function is defined as follows: f(x) = x+3 if x<-2 and $f(x)= \...
Avenger's user avatar
  • 103
2 votes
2 answers
419 views

Is there an easy way to plot Jacobi Elliptic Functions with Tikz-PGF?

So The Jacobi Elliptic Functions are a little bit tricky to plot because they depend on the complete elliptic integral of the first kind K(k) that can be written as a sum of double factorials, and the ...
Felipe Dilho's user avatar
1 vote
1 answer
118 views

How to define coordinates based on function in pstricks

I would like to define coordinates based on a function. \documentclass[pstricks,border=12pt]{exam} \usepackage{pst-all} \begin{document} \psset{xunit=2cm,yunit=1cm} \begin{pspicture}...
Garth Fleming's user avatar