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?
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
New contributor
add a comment |
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
New contributor
Yourdraw
code must inbeginaxis
andendaxis
. 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
add a comment |
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
New contributor
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
pgfplots tikz-pic
New contributor
New contributor
New contributor
asked 9 hours ago
J.Z.J.Z.
83
83
New contributor
New contributor
Yourdraw
code must inbeginaxis
andendaxis
. 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
add a comment |
Yourdraw
code must inbeginaxis
andendaxis
. 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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%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
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
add a comment |
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
add a comment |
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
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
answered 9 hours ago
ferahfezaferahfeza
6,90911933
6,90911933
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
Your
draw
code must inbeginaxis
andendaxis
. 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