pgfplots: How to draw a tangent graph below two others?plotting 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

Zip/Tar file compressed to larger size?

Can my sorcerer use a spellbook only to collect spells and scribe scrolls, not cast?

How badly should I try to prevent a user from XSSing themselves?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Why didn't Miles's spider sense work before?

How do conventional missiles fly?

How would I stat a creature to be immune to everything but the Magic Missile spell? (just for fun)

Personal Teleportation: From Rags to Riches

What mechanic is there to disable a threat instead of killing it?

Apex Framework / library for consuming REST services

Why no variance term in Bayesian logistic regression?

Can compressed videos be decoded back to their uncompresed original format?

Detention in 1997

Do UK voters know if their MP will be the Speaker of the House?

I would say: "You are another teacher", but she is a woman and I am a man

Are there any examples of a variable being normally distributed that is *not* due to the Central Limit Theorem?

Is it inappropriate for a student to attend their mentor's dissertation defense?

Why would the Red Woman birth a shadow if she worshipped the Lord of the Light?

How seriously should I take size and weight limits of hand luggage?

How dangerous is XSS?

Can I run a new neutral wire to repair a broken circuit?

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?



pgfplots: How to draw a tangent graph below two others?


plotting 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













7















Assumed I want to draw three simple graphs based on the following illustration:



Screenshot of the desired state




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:



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?










share|improve this question



















  • 3





    @close-voter: Please explain in a comment your reason for voting to close!

    – Kurt
    2 days ago











  • I accept the Kurt's comment.

    – Sebastiano
    2 days ago















7















Assumed I want to draw three simple graphs based on the following illustration:



Screenshot of the desired state




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:



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?










share|improve this question



















  • 3





    @close-voter: Please explain in a comment your reason for voting to close!

    – Kurt
    2 days ago











  • I accept the Kurt's comment.

    – Sebastiano
    2 days ago













7












7








7


2






Assumed I want to draw three simple graphs based on the following illustration:



Screenshot of the desired state




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:



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?










share|improve this question
















Assumed I want to draw three simple graphs based on the following illustration:



Screenshot of the desired state




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:



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago







Dave

















asked 2 days ago









DaveDave

1,185619




1,185619







  • 3





    @close-voter: Please explain in a comment your reason for voting to close!

    – Kurt
    2 days ago











  • I accept the Kurt's comment.

    – Sebastiano
    2 days ago












  • 3





    @close-voter: Please explain in a comment your reason for voting to close!

    – Kurt
    2 days ago











  • I accept the Kurt's comment.

    – Sebastiano
    2 days ago







3




3





@close-voter: Please explain in a comment your reason for voting to close!

– Kurt
2 days ago





@close-voter: Please explain in a comment your reason for voting to close!

– Kurt
2 days ago













I accept the Kurt's comment.

– Sebastiano
2 days ago





I accept the Kurt's comment.

– Sebastiano
2 days ago










2 Answers
2






active

oldest

votes


















9














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


enter image description here



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



enter image description here



Slightly more general, one can use the exponent a (does not have to be an integer):



 foreach a in 1,...,5
addplot+[no marks, samples=100] (f1(x)^a*f2(x)^a/(f1(x)^a+f2(x)^a))^(1/a);



enter image description here






share|improve this answer

























  • The lower one looks perfect, thank you very much!!

    – Dave
    2 days ago


















5














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


enter image description here






share|improve this answer























  • 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
    2 days ago












Your Answer








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
);



);













draft saved

draft discarded


















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









9














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


enter image description here



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



enter image description here



Slightly more general, one can use the exponent a (does not have to be an integer):



 foreach a in 1,...,5
addplot+[no marks, samples=100] (f1(x)^a*f2(x)^a/(f1(x)^a+f2(x)^a))^(1/a);



enter image description here






share|improve this answer

























  • The lower one looks perfect, thank you very much!!

    – Dave
    2 days ago















9














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


enter image description here



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



enter image description here



Slightly more general, one can use the exponent a (does not have to be an integer):



 foreach a in 1,...,5
addplot+[no marks, samples=100] (f1(x)^a*f2(x)^a/(f1(x)^a+f2(x)^a))^(1/a);



enter image description here






share|improve this answer

























  • The lower one looks perfect, thank you very much!!

    – Dave
    2 days ago













9












9








9







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


enter image description here



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



enter image description here



Slightly more general, one can use the exponent a (does not have to be an integer):



 foreach a in 1,...,5
addplot+[no marks, samples=100] (f1(x)^a*f2(x)^a/(f1(x)^a+f2(x)^a))^(1/a);



enter image description here






share|improve this answer















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


enter image description here



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



enter image description here



Slightly more general, one can use the exponent a (does not have to be an integer):



 foreach a in 1,...,5
addplot+[no marks, samples=100] (f1(x)^a*f2(x)^a/(f1(x)^a+f2(x)^a))^(1/a);



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered 2 days ago









StefanHStefanH

10.9k1920




10.9k1920












  • The lower one looks perfect, thank you very much!!

    – Dave
    2 days ago

















  • The lower one looks perfect, thank you very much!!

    – Dave
    2 days ago
















The lower one looks perfect, thank you very much!!

– Dave
2 days ago





The lower one looks perfect, thank you very much!!

– Dave
2 days ago











5














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


enter image description here






share|improve this answer























  • 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
    2 days ago
















5














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


enter image description here






share|improve this answer























  • 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
    2 days ago














5












5








5







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


enter image description here






share|improve this answer













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


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









marmotmarmot

114k5145276




114k5145276












  • 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
    2 days 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
    2 days 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
2 days 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
2 days ago


















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070