How to draw a curly brace at a correct location between 2 points with coordinates in a plot?Use pgfplots addplot plot coordinates with relative coordinatesplotting two time series with boundsHow do i get the x axis on top but keep a line on the bottomHow to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphpgfplots: percentage in matrix plotCenter the axes in the coordinate originPlot point with symbolic coordinateshow to draw the following picture quickly and curly brace?Pgfplot: How to draw a plot with self-defined coordinates?

How to simplify this time periods definition interface?

Does Mathematica reuse previous computations?

Are ETF trackers fundamentally better than individual stocks?

Why doesn't the EU now just force the UK to choose between referendum and no-deal?

Brexit - No Deal Rejection

How to write cleanly even if my character uses expletive language?

Define, (actually define) the "stability" and "energy" of a compound

Instead of Universal Basic Income, why not Universal Basic NEEDS?

In a future war, an old lady is trying to raise a boy but one of the weapons has made everyone deaf

how to draw discrete time diagram in tikz

What did Alexander Pope mean by "Expletives their feeble Aid do join"?

PTIJ: Who should I vote for? (21st Knesset Edition)

Why doesn't using two cd commands in bash script execute the second command?

Gravity magic - How does it work?

How to make healing in an exploration game interesting

What options are left, if Britain cannot decide?

Recruiter wants very extensive technical details about all of my previous work

Combining an idiom with a metonymy

How to deal with a cynical class?

Professor being mistaken for a grad student

Is a party consisting of only a bard, a cleric, and a warlock functional long-term?

Does Wild Magic Surge trigger off of spells on the Sorcerer spell list, if I learned them from another class?

Sailing the cryptic seas

Time travel from stationary position?



How to draw a curly brace at a correct location between 2 points with coordinates in a plot?


Use pgfplots addplot plot coordinates with relative coordinatesplotting two time series with boundsHow do i get the x axis on top but keep a line on the bottomHow to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphpgfplots: percentage in matrix plotCenter the axes in the coordinate originPlot point with symbolic coordinateshow to draw the following picture quickly and curly brace?Pgfplot: How to draw a plot with self-defined coordinates?













1















documentclassarticle

usepackagetikz
usetikzlibrarydecorations.pathreplacing

usepackagepgfplots
usepackagexcolor

begindocument

begincenter
begintikzpicture
beginaxis[
xlabel=x,
ylabel=y,
xmin=0, xmax=5,
ymin=0, ymax=8,
xtick=0,1,2,3,4,5,
ytick=0,2,4,6,8,10,
]


addplot[
only marks,
color=blue,
mark=square
]
coordinates
(1,2) (2,4) (3,4) (4,6)
;

addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

endaxis
draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;

endtikzpicture
endcenter

enddocument


I am trying to draw a brace between point (2,4) and (2,3.2), but couldn't get it at a correct location using the code



draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;


. You can understand the brace as pointing out the bias of the line when x=2. Any help is highly appreciated!



Thanks!










share|improve this question







New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Your draw code must in beginaxis and endaxis. And your coordinates must define in your coordinate axis, i.e, use (axis cs:2,4) instead of (2,4) and so on.

    – ferahfeza
    9 hours ago







  • 1





    fixed. Thanks! Please move your comment to answer for me to mark it. Thank you!

    – J.Z.
    9 hours ago











  • You welcome. I added the answer.

    – ferahfeza
    9 hours ago















1















documentclassarticle

usepackagetikz
usetikzlibrarydecorations.pathreplacing

usepackagepgfplots
usepackagexcolor

begindocument

begincenter
begintikzpicture
beginaxis[
xlabel=x,
ylabel=y,
xmin=0, xmax=5,
ymin=0, ymax=8,
xtick=0,1,2,3,4,5,
ytick=0,2,4,6,8,10,
]


addplot[
only marks,
color=blue,
mark=square
]
coordinates
(1,2) (2,4) (3,4) (4,6)
;

addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

endaxis
draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;

endtikzpicture
endcenter

enddocument


I am trying to draw a brace between point (2,4) and (2,3.2), but couldn't get it at a correct location using the code



draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;


. You can understand the brace as pointing out the bias of the line when x=2. Any help is highly appreciated!



Thanks!










share|improve this question







New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Your draw code must in beginaxis and endaxis. And your coordinates must define in your coordinate axis, i.e, use (axis cs:2,4) instead of (2,4) and so on.

    – ferahfeza
    9 hours ago







  • 1





    fixed. Thanks! Please move your comment to answer for me to mark it. Thank you!

    – J.Z.
    9 hours ago











  • You welcome. I added the answer.

    – ferahfeza
    9 hours ago













1












1








1








documentclassarticle

usepackagetikz
usetikzlibrarydecorations.pathreplacing

usepackagepgfplots
usepackagexcolor

begindocument

begincenter
begintikzpicture
beginaxis[
xlabel=x,
ylabel=y,
xmin=0, xmax=5,
ymin=0, ymax=8,
xtick=0,1,2,3,4,5,
ytick=0,2,4,6,8,10,
]


addplot[
only marks,
color=blue,
mark=square
]
coordinates
(1,2) (2,4) (3,4) (4,6)
;

addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

endaxis
draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;

endtikzpicture
endcenter

enddocument


I am trying to draw a brace between point (2,4) and (2,3.2), but couldn't get it at a correct location using the code



draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;


. You can understand the brace as pointing out the bias of the line when x=2. Any help is highly appreciated!



Thanks!










share|improve this question







New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












documentclassarticle

usepackagetikz
usetikzlibrarydecorations.pathreplacing

usepackagepgfplots
usepackagexcolor

begindocument

begincenter
begintikzpicture
beginaxis[
xlabel=x,
ylabel=y,
xmin=0, xmax=5,
ymin=0, ymax=8,
xtick=0,1,2,3,4,5,
ytick=0,2,4,6,8,10,
]


addplot[
only marks,
color=blue,
mark=square
]
coordinates
(1,2) (2,4) (3,4) (4,6)
;

addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

endaxis
draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;

endtikzpicture
endcenter

enddocument


I am trying to draw a brace between point (2,4) and (2,3.2), but couldn't get it at a correct location using the code



draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(2,4) -- (2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;


. You can understand the brace as pointing out the bias of the line when x=2. Any help is highly appreciated!



Thanks!







pgfplots tikz-pic






share|improve this question







New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 9 hours ago









J.Z.J.Z.

83




83




New contributor




J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






J.Z. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Your draw code must in beginaxis and endaxis. And your coordinates must define in your coordinate axis, i.e, use (axis cs:2,4) instead of (2,4) and so on.

    – ferahfeza
    9 hours ago







  • 1





    fixed. Thanks! Please move your comment to answer for me to mark it. Thank you!

    – J.Z.
    9 hours ago











  • You welcome. I added the answer.

    – ferahfeza
    9 hours ago

















  • Your draw code must in beginaxis and endaxis. And your coordinates must define in your coordinate axis, i.e, use (axis cs:2,4) instead of (2,4) and so on.

    – ferahfeza
    9 hours ago







  • 1





    fixed. Thanks! Please move your comment to answer for me to mark it. Thank you!

    – J.Z.
    9 hours ago











  • You welcome. I added the answer.

    – ferahfeza
    9 hours ago
















Your draw code must in beginaxis and endaxis. And your coordinates must define in your coordinate axis, i.e, use (axis cs:2,4) instead of (2,4) and so on.

– ferahfeza
9 hours ago






Your draw code must in beginaxis and endaxis. And your coordinates must define in your coordinate axis, i.e, use (axis cs:2,4) instead of (2,4) and so on.

– ferahfeza
9 hours ago





1




1





fixed. Thanks! Please move your comment to answer for me to mark it. Thank you!

– J.Z.
9 hours ago





fixed. Thanks! Please move your comment to answer for me to mark it. Thank you!

– J.Z.
9 hours ago













You welcome. I added the answer.

– ferahfeza
9 hours ago





You welcome. I added the answer.

– ferahfeza
9 hours ago










1 Answer
1






active

oldest

votes


















2














Try this.



documentclassarticle

usepackagetikz
usetikzlibrarydecorations.pathreplacing

usepackagepgfplots
usepackagexcolor

begindocument

begincenter
begintikzpicture
beginaxis[
xlabel=x,
ylabel=y,
xmin=0, xmax=5,
ymin=0, ymax=8,
xtick=0,1,2,3,4,5,
ytick=0,2,4,6,8,10,
]


addplot[
only marks,
color=blue,
mark=square
]
coordinates
(1,2) (2,4) (3,4) (4,6)
;
addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
(axis cs:2,4) -- (axis cs:2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
;
endaxis

endtikzpicture
endcenter

enddocument





share|improve this answer






















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



    );






    J.Z. is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479700%2fhow-to-draw-a-curly-brace-at-a-correct-location-between-2-points-with-coordinate%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Try this.



    documentclassarticle

    usepackagetikz
    usetikzlibrarydecorations.pathreplacing

    usepackagepgfplots
    usepackagexcolor

    begindocument

    begincenter
    begintikzpicture
    beginaxis[
    xlabel=x,
    ylabel=y,
    xmin=0, xmax=5,
    ymin=0, ymax=8,
    xtick=0,1,2,3,4,5,
    ytick=0,2,4,6,8,10,
    ]


    addplot[
    only marks,
    color=blue,
    mark=square
    ]
    coordinates
    (1,2) (2,4) (3,4) (4,6)
    ;
    addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

    draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
    (axis cs:2,4) -- (axis cs:2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
    ;
    endaxis

    endtikzpicture
    endcenter

    enddocument





    share|improve this answer



























      2














      Try this.



      documentclassarticle

      usepackagetikz
      usetikzlibrarydecorations.pathreplacing

      usepackagepgfplots
      usepackagexcolor

      begindocument

      begincenter
      begintikzpicture
      beginaxis[
      xlabel=x,
      ylabel=y,
      xmin=0, xmax=5,
      ymin=0, ymax=8,
      xtick=0,1,2,3,4,5,
      ytick=0,2,4,6,8,10,
      ]


      addplot[
      only marks,
      color=blue,
      mark=square
      ]
      coordinates
      (1,2) (2,4) (3,4) (4,6)
      ;
      addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

      draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
      (axis cs:2,4) -- (axis cs:2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
      ;
      endaxis

      endtikzpicture
      endcenter

      enddocument





      share|improve this answer

























        2












        2








        2







        Try this.



        documentclassarticle

        usepackagetikz
        usetikzlibrarydecorations.pathreplacing

        usepackagepgfplots
        usepackagexcolor

        begindocument

        begincenter
        begintikzpicture
        beginaxis[
        xlabel=x,
        ylabel=y,
        xmin=0, xmax=5,
        ymin=0, ymax=8,
        xtick=0,1,2,3,4,5,
        ytick=0,2,4,6,8,10,
        ]


        addplot[
        only marks,
        color=blue,
        mark=square
        ]
        coordinates
        (1,2) (2,4) (3,4) (4,6)
        ;
        addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

        draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
        (axis cs:2,4) -- (axis cs:2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
        ;
        endaxis

        endtikzpicture
        endcenter

        enddocument





        share|improve this answer













        Try this.



        documentclassarticle

        usepackagetikz
        usetikzlibrarydecorations.pathreplacing

        usepackagepgfplots
        usepackagexcolor

        begindocument

        begincenter
        begintikzpicture
        beginaxis[
        xlabel=x,
        ylabel=y,
        xmin=0, xmax=5,
        ymin=0, ymax=8,
        xtick=0,1,2,3,4,5,
        ytick=0,2,4,6,8,10,
        ]


        addplot[
        only marks,
        color=blue,
        mark=square
        ]
        coordinates
        (1,2) (2,4) (3,4) (4,6)
        ;
        addplot[no marks,blue] expression[domain=1:4,samples=50]1.6*x;

        draw [decorate,decoration=brace,amplitude=2pt,mirror, yshift = -0.2cm]
        (axis cs:2,4) -- (axis cs:2,3.2) node (curly_bracket)[black,midway, yshift =- 0.3 cm]
        ;
        endaxis

        endtikzpicture
        endcenter

        enddocument






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 9 hours ago









        ferahfezaferahfeza

        6,90911933




        6,90911933




















            J.Z. is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            J.Z. is a new contributor. Be nice, and check out our Code of Conduct.












            J.Z. is a new contributor. Be nice, and check out our Code of Conduct.











            J.Z. is a new contributor. Be nice, and check out our Code of Conduct.














            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%2f479700%2fhow-to-draw-a-curly-brace-at-a-correct-location-between-2-points-with-coordinate%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

            How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

            152 Atala Notae | Nexus externi | Tabula navigationis"Discovery Circumstances: Numbered Minor Planets"2000152Small-Body Database

            Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"