pgfplots: How to draw a tangent graph below two others? The Next CEO of Stack Overflowplotting two time series with boundsGrouped bar chartHow do i get the x axis on top but keep a line on the bottomHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingpgfplots: percentage in matrix plotHow to draw a square and its diagonals with arrows?PGFPlots - Fill area between two curves
Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?
Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?
Incomplete cube
Horror film about a man brought out of cryogenic suspension without a soul, around 1990
Shortening a title without changing its meaning
Find the majority element, which appears more than half the time
Does Germany produce more waste than the US?
How do I keep Mac Emacs from trapping M-`?
Creating a script with console commands
Are British MPs missing the point, with these 'Indicative Votes'?
Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico
Is the sample correlation always positively correlated with the sample variance?
Man transported from Alternate World into ours by a Neutrino Detector
Calculate the Mean mean of two numbers
A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
What steps are necessary to read a Modern SSD in Medieval Europe?
How to find if SQL server backup is encrypted with TDE without restoring the backup
Can Sri Krishna be called 'a person'?
Is it a bad idea to plug the other end of ESD strap to wall ground?
Why does freezing point matter when picking cooler ice packs?
Calculating discount not working
What day is it again?
logical reads on global temp table, but not on session-level temp table
pgfplots: How to draw a tangent graph below two others?
The Next CEO of Stack Overflowplotting two time series with boundsGrouped bar chartHow do i get the x axis on top but keep a line on the bottomHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingpgfplots: percentage in matrix plotHow to draw a square and its diagonals with arrows?PGFPlots - Fill area between two curves
Assumed I want to draw three simple graphs based on the following illustration:
How can I plot those three graphs? I've tried to create something like this:
Minimum Working Example (MWE):
documentclassstandalone
usepackagepgfplots
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
endaxis
endtikzpicture
enddocument
Screenshot of the current state:
Description of the issue:
However, I don't get the point on how to figure out the function of the third graph as well as how to clip the graphs in x
and y
direction to align them centered in the plot. It is not necessary to be completely precise, the accuracy of my upper template will be fine enough.
How to do that?
tikz-pgf pgfplots plot graphs polynomials
add a comment |
Assumed I want to draw three simple graphs based on the following illustration:
How can I plot those three graphs? I've tried to create something like this:
Minimum Working Example (MWE):
documentclassstandalone
usepackagepgfplots
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
endaxis
endtikzpicture
enddocument
Screenshot of the current state:
Description of the issue:
However, I don't get the point on how to figure out the function of the third graph as well as how to clip the graphs in x
and y
direction to align them centered in the plot. It is not necessary to be completely precise, the accuracy of my upper template will be fine enough.
How to do that?
tikz-pgf pgfplots plot graphs polynomials
2
@close-voter: Please explain in a comment your reason for voting to close!
– Kurt
4 hours ago
I accept the Kurt's comment.
– Sebastiano
4 hours ago
add a comment |
Assumed I want to draw three simple graphs based on the following illustration:
How can I plot those three graphs? I've tried to create something like this:
Minimum Working Example (MWE):
documentclassstandalone
usepackagepgfplots
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
endaxis
endtikzpicture
enddocument
Screenshot of the current state:
Description of the issue:
However, I don't get the point on how to figure out the function of the third graph as well as how to clip the graphs in x
and y
direction to align them centered in the plot. It is not necessary to be completely precise, the accuracy of my upper template will be fine enough.
How to do that?
tikz-pgf pgfplots plot graphs polynomials
Assumed I want to draw three simple graphs based on the following illustration:
How can I plot those three graphs? I've tried to create something like this:
Minimum Working Example (MWE):
documentclassstandalone
usepackagepgfplots
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
endaxis
endtikzpicture
enddocument
Screenshot of the current state:
Description of the issue:
However, I don't get the point on how to figure out the function of the third graph as well as how to clip the graphs in x
and y
direction to align them centered in the plot. It is not necessary to be completely precise, the accuracy of my upper template will be fine enough.
How to do that?
tikz-pgf pgfplots plot graphs polynomials
tikz-pgf pgfplots plot graphs polynomials
edited 4 hours ago
Dave
asked 5 hours ago
DaveDave
1,128619
1,128619
2
@close-voter: Please explain in a comment your reason for voting to close!
– Kurt
4 hours ago
I accept the Kurt's comment.
– Sebastiano
4 hours ago
add a comment |
2
@close-voter: Please explain in a comment your reason for voting to close!
– Kurt
4 hours ago
I accept the Kurt's comment.
– Sebastiano
4 hours ago
2
2
@close-voter: Please explain in a comment your reason for voting to close!
– Kurt
4 hours ago
@close-voter: Please explain in a comment your reason for voting to close!
– Kurt
4 hours ago
I accept the Kurt's comment.
– Sebastiano
4 hours ago
I accept the Kurt's comment.
– Sebastiano
4 hours ago
add a comment |
2 Answers
2
active
oldest
votes
You can use the function f1*f2/(f1+f2) to get something like what you describe. To make the code a bit clearer I defined the functions f1
and f2
.
documentclassstandalone
usepackagepgfplots
pgfplotsset%
compat=1.12,
/pgf/declare function=f1(x)=exp(3*x);,
/pgf/declare function=f2(x)=-exp(3*x)+20;,
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] f1(x);
addplot+[no marks, samples=100] f2(x);
addplot+[no marks, samples=100] f1(x)*f2(x)/(f1(x)+f2(x));
endaxis
endtikzpicture
enddocument
If you want the function to follow more closely you can use sqrt(f1^2*f2^2/(f1^2+f2^2). Then replace the third plot with
addplot+[no marks, samples=100] sqrt(f1(x)*f1(x)*f2(x)*f2(x)/(f1(x)*f1(x)+f2(x)*f2(x)));
to get
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
add a comment |
Are you looking for the minimum? (I shifted the plot a bit but you can of course undo the shift.)
documentclass[border=3.14mm,tikz]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
addplot+[no marks, samples=6,smooth]
min(exp(3*x),(-exp(3*x)+20))-pi/2;
endaxis
endtikzpicture
enddocument
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482639%2fpgfplots-how-to-draw-a-tangent-graph-below-two-others%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use the function f1*f2/(f1+f2) to get something like what you describe. To make the code a bit clearer I defined the functions f1
and f2
.
documentclassstandalone
usepackagepgfplots
pgfplotsset%
compat=1.12,
/pgf/declare function=f1(x)=exp(3*x);,
/pgf/declare function=f2(x)=-exp(3*x)+20;,
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] f1(x);
addplot+[no marks, samples=100] f2(x);
addplot+[no marks, samples=100] f1(x)*f2(x)/(f1(x)+f2(x));
endaxis
endtikzpicture
enddocument
If you want the function to follow more closely you can use sqrt(f1^2*f2^2/(f1^2+f2^2). Then replace the third plot with
addplot+[no marks, samples=100] sqrt(f1(x)*f1(x)*f2(x)*f2(x)/(f1(x)*f1(x)+f2(x)*f2(x)));
to get
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
add a comment |
You can use the function f1*f2/(f1+f2) to get something like what you describe. To make the code a bit clearer I defined the functions f1
and f2
.
documentclassstandalone
usepackagepgfplots
pgfplotsset%
compat=1.12,
/pgf/declare function=f1(x)=exp(3*x);,
/pgf/declare function=f2(x)=-exp(3*x)+20;,
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] f1(x);
addplot+[no marks, samples=100] f2(x);
addplot+[no marks, samples=100] f1(x)*f2(x)/(f1(x)+f2(x));
endaxis
endtikzpicture
enddocument
If you want the function to follow more closely you can use sqrt(f1^2*f2^2/(f1^2+f2^2). Then replace the third plot with
addplot+[no marks, samples=100] sqrt(f1(x)*f1(x)*f2(x)*f2(x)/(f1(x)*f1(x)+f2(x)*f2(x)));
to get
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
add a comment |
You can use the function f1*f2/(f1+f2) to get something like what you describe. To make the code a bit clearer I defined the functions f1
and f2
.
documentclassstandalone
usepackagepgfplots
pgfplotsset%
compat=1.12,
/pgf/declare function=f1(x)=exp(3*x);,
/pgf/declare function=f2(x)=-exp(3*x)+20;,
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] f1(x);
addplot+[no marks, samples=100] f2(x);
addplot+[no marks, samples=100] f1(x)*f2(x)/(f1(x)+f2(x));
endaxis
endtikzpicture
enddocument
If you want the function to follow more closely you can use sqrt(f1^2*f2^2/(f1^2+f2^2). Then replace the third plot with
addplot+[no marks, samples=100] sqrt(f1(x)*f1(x)*f2(x)*f2(x)/(f1(x)*f1(x)+f2(x)*f2(x)));
to get
You can use the function f1*f2/(f1+f2) to get something like what you describe. To make the code a bit clearer I defined the functions f1
and f2
.
documentclassstandalone
usepackagepgfplots
pgfplotsset%
compat=1.12,
/pgf/declare function=f1(x)=exp(3*x);,
/pgf/declare function=f2(x)=-exp(3*x)+20;,
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] f1(x);
addplot+[no marks, samples=100] f2(x);
addplot+[no marks, samples=100] f1(x)*f2(x)/(f1(x)+f2(x));
endaxis
endtikzpicture
enddocument
If you want the function to follow more closely you can use sqrt(f1^2*f2^2/(f1^2+f2^2). Then replace the third plot with
addplot+[no marks, samples=100] sqrt(f1(x)*f1(x)*f2(x)*f2(x)/(f1(x)*f1(x)+f2(x)*f2(x)));
to get
answered 4 hours ago
StefanHStefanH
10.8k1820
10.8k1820
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
add a comment |
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
The lower one looks perfect, thank you very much!!
– Dave
3 hours ago
add a comment |
Are you looking for the minimum? (I shifted the plot a bit but you can of course undo the shift.)
documentclass[border=3.14mm,tikz]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
addplot+[no marks, samples=6,smooth]
min(exp(3*x),(-exp(3*x)+20))-pi/2;
endaxis
endtikzpicture
enddocument
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
add a comment |
Are you looking for the minimum? (I shifted the plot a bit but you can of course undo the shift.)
documentclass[border=3.14mm,tikz]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
addplot+[no marks, samples=6,smooth]
min(exp(3*x),(-exp(3*x)+20))-pi/2;
endaxis
endtikzpicture
enddocument
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
add a comment |
Are you looking for the minimum? (I shifted the plot a bit but you can of course undo the shift.)
documentclass[border=3.14mm,tikz]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
addplot+[no marks, samples=6,smooth]
min(exp(3*x),(-exp(3*x)+20))-pi/2;
endaxis
endtikzpicture
enddocument
Are you looking for the minimum? (I shifted the plot a bit but you can of course undo the shift.)
documentclass[border=3.14mm,tikz]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture
beginaxis[domain=0:1]
addplot+[no marks, samples=100] exp(3*x);
addplot+[no marks, samples=100] (-exp(3*x)+20);
addplot+[no marks, samples=6,smooth]
min(exp(3*x),(-exp(3*x)+20))-pi/2;
endaxis
endtikzpicture
enddocument
answered 4 hours ago
marmotmarmot
113k5145275
113k5145275
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
add a comment |
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
Thank you very much marmot! The user StefanH has also posted a great approach which looks very smooth - I hope you are not disappointed if I choose his option as an answer?
– Dave
3 hours ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482639%2fpgfplots-how-to-draw-a-tangent-graph-below-two-others%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
@close-voter: Please explain in a comment your reason for voting to close!
– Kurt
4 hours ago
I accept the Kurt's comment.
– Sebastiano
4 hours ago