Box half filled colorStrange behavior in TikZ draw commandIn TikZ when is “line join=miter” the preferrable over “line join=round”?Rectangle node with given coordinates in tikzHow to create a rectangle filled with image using TikZ?filled circle in table fieldHow to fill by dotted water below rounded corners?How could I make this diagram with TikZ (LaTeX2e) ((split lines))Creating a bar filled only by a portion in asideFilled curved in legend entry - tikz/pgfHow can I color fill the annulus with tikz?Fill area between vectors with color

Do I have to take mana from my deck or hand when tapping this card?

When is the exact date for EOL of Ubuntu 14.04 LTS?

Why do Radio Buttons not fill the entire outer circle?

Travelling in US for more than 90 days

What can I do if I am asked to learn different programming languages very frequently?

Why is indicated airspeed rather than ground speed used during the takeoff roll?

"Marked down as someone wanting to sell shares." What does that mean?

Is there a distance limit for minecart tracks?

How to get directions in deep space?

How do you say "Trust your struggle." in French?

C++ lambda syntax

Extract substring according to regexp with sed or grep

How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?

Should I warn a new PhD Student?

Can you describe someone as luxurious? As in someone who likes luxurious things?

Relations between homogeneous polynomials

Sort with assumptions

"Oh no!" in Latin

Should a narrator ever describe things based on a character's view instead of facts?

Magnifying glass in hyperbolic space

Why didn't Voldemort know what Grindelwald looked like?

What is the tangent at a sharp point on a curve?

Reason why a kingside attack is not justified

Why can't I get pgrep output right to variable on bash script?



Box half filled color


Strange behavior in TikZ draw commandIn TikZ when is “line join=miter” the preferrable over “line join=round”?Rectangle node with given coordinates in tikzHow to create a rectangle filled with image using TikZ?filled circle in table fieldHow to fill by dotted water below rounded corners?How could I make this diagram with TikZ (LaTeX2e) ((split lines))Creating a bar filled only by a portion in asideFilled curved in legend entry - tikz/pgfHow can I color fill the annulus with tikz?Fill area between vectors with color













7















I am trying kinda to make this figure in tikz but I do not know how it works.
I tried with



tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]


But I can not fill both sides with color.



enter image description here










share|improve this question







New contributor




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




















  • Box half filled with white.

    – Dylan
    7 hours ago















7















I am trying kinda to make this figure in tikz but I do not know how it works.
I tried with



tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]


But I can not fill both sides with color.



enter image description here










share|improve this question







New contributor




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




















  • Box half filled with white.

    – Dylan
    7 hours ago













7












7








7


0






I am trying kinda to make this figure in tikz but I do not know how it works.
I tried with



tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]


But I can not fill both sides with color.



enter image description here










share|improve this question







New contributor




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












I am trying kinda to make this figure in tikz but I do not know how it works.
I tried with



tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]


But I can not fill both sides with color.



enter image description here







tikz-pgf draw fill






share|improve this question







New contributor




Geo 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




Geo 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




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









asked 19 hours ago









GeoGeo

383




383




New contributor




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





New contributor





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






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












  • Box half filled with white.

    – Dylan
    7 hours ago

















  • Box half filled with white.

    – Dylan
    7 hours ago
















Box half filled with white.

– Dylan
7 hours ago





Box half filled with white.

– Dylan
7 hours ago










2 Answers
2






active

oldest

votes


















7














If you prefer tcolorbox:



documentclassarticle 
usepackage[most]tcolorbox

begindocument
begintcolorbox[
sharp corners, boxsep=5mm, boxrule=.5mm,
colback=brown, width=5cm,
halign upper=left, valign upper=top,
halign lower=right, valign lower=bottom,
enhanced, segmentation empty,
underlay = -cycle;
endtcbclipinterior
]
A
tcblower
B
endtcolorbox
enddocument


enter image description here






share|improve this answer

























  • I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

    – Geo
    12 hours ago






  • 1





    @Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

    – Ignasi
    12 hours ago











  • I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

    – Geo
    12 hours ago






  • 2





    @Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

    – Ignasi
    12 hours ago


















8














Welcome to TeX.SE. From the next time try adding a compilable MWE, so that it will attract more users to answer your question.



You can start with (borders):



documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
filldraw [black] (3, 2) --(3,0)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
filldraw [red] (3, 2) --(0,2)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
draw[yellow, thick] (0,0)--(0,2)--(3,2)--(3,0)--cycle;
endtikzpicture
enddocument


to get:



enter image description here



and I leave the rest of customisation for you to do ;).






share|improve this answer

























  • this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

    – Geo
    18 hours ago












  • @Geo you can manually draw the borders around them :) see my updated answer ;)

    – Raaja
    18 hours ago







  • 1





    thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

    – Geo
    18 hours ago











  • @Geo Tikzpgf manual.

    – Raaja
    18 hours 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
);



);






Geo 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%2f480219%2fbox-half-filled-color%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









7














If you prefer tcolorbox:



documentclassarticle 
usepackage[most]tcolorbox

begindocument
begintcolorbox[
sharp corners, boxsep=5mm, boxrule=.5mm,
colback=brown, width=5cm,
halign upper=left, valign upper=top,
halign lower=right, valign lower=bottom,
enhanced, segmentation empty,
underlay = -cycle;
endtcbclipinterior
]
A
tcblower
B
endtcolorbox
enddocument


enter image description here






share|improve this answer

























  • I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

    – Geo
    12 hours ago






  • 1





    @Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

    – Ignasi
    12 hours ago











  • I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

    – Geo
    12 hours ago






  • 2





    @Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

    – Ignasi
    12 hours ago















7














If you prefer tcolorbox:



documentclassarticle 
usepackage[most]tcolorbox

begindocument
begintcolorbox[
sharp corners, boxsep=5mm, boxrule=.5mm,
colback=brown, width=5cm,
halign upper=left, valign upper=top,
halign lower=right, valign lower=bottom,
enhanced, segmentation empty,
underlay = -cycle;
endtcbclipinterior
]
A
tcblower
B
endtcolorbox
enddocument


enter image description here






share|improve this answer

























  • I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

    – Geo
    12 hours ago






  • 1





    @Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

    – Ignasi
    12 hours ago











  • I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

    – Geo
    12 hours ago






  • 2





    @Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

    – Ignasi
    12 hours ago













7












7








7







If you prefer tcolorbox:



documentclassarticle 
usepackage[most]tcolorbox

begindocument
begintcolorbox[
sharp corners, boxsep=5mm, boxrule=.5mm,
colback=brown, width=5cm,
halign upper=left, valign upper=top,
halign lower=right, valign lower=bottom,
enhanced, segmentation empty,
underlay = -cycle;
endtcbclipinterior
]
A
tcblower
B
endtcolorbox
enddocument


enter image description here






share|improve this answer















If you prefer tcolorbox:



documentclassarticle 
usepackage[most]tcolorbox

begindocument
begintcolorbox[
sharp corners, boxsep=5mm, boxrule=.5mm,
colback=brown, width=5cm,
halign upper=left, valign upper=top,
halign lower=right, valign lower=bottom,
enhanced, segmentation empty,
underlay = -cycle;
endtcbclipinterior
]
A
tcblower
B
endtcolorbox
enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 16 hours ago

























answered 16 hours ago









IgnasiIgnasi

95k4175318




95k4175318












  • I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

    – Geo
    12 hours ago






  • 1





    @Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

    – Ignasi
    12 hours ago











  • I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

    – Geo
    12 hours ago






  • 2





    @Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

    – Ignasi
    12 hours ago

















  • I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

    – Geo
    12 hours ago






  • 1





    @Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

    – Ignasi
    12 hours ago











  • I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

    – Geo
    12 hours ago






  • 2





    @Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

    – Ignasi
    12 hours ago
















I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

– Geo
12 hours ago





I approved this one since it is closer to my original question. I do not know though how to change position of A and B or add more text to different position inside the box.

– Geo
12 hours ago




1




1





@Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

– Ignasi
12 hours ago





@Geo tcolorbox allows to have two different paragraphs upper and lower. But these paragraphs are formatted as normal paragraphs, they won't adjust to upper or lower designs unless you use parshape. About adding more text in different positions, you could always use an overlay but this is another question and we need more information to be able to solve it.

– Ignasi
12 hours ago













I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

– Geo
12 hours ago





I meant add more text in brown or orange section. Like add "Hello" on either section but on a different position say up right or bottom left.

– Geo
12 hours ago




2




2





@Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

– Ignasi
12 hours ago





@Geo replace A or B for the text you want and play with halign upper options. And take a look at tcolorbox documentation.

– Ignasi
12 hours ago











8














Welcome to TeX.SE. From the next time try adding a compilable MWE, so that it will attract more users to answer your question.



You can start with (borders):



documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
filldraw [black] (3, 2) --(3,0)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
filldraw [red] (3, 2) --(0,2)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
draw[yellow, thick] (0,0)--(0,2)--(3,2)--(3,0)--cycle;
endtikzpicture
enddocument


to get:



enter image description here



and I leave the rest of customisation for you to do ;).






share|improve this answer

























  • this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

    – Geo
    18 hours ago












  • @Geo you can manually draw the borders around them :) see my updated answer ;)

    – Raaja
    18 hours ago







  • 1





    thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

    – Geo
    18 hours ago











  • @Geo Tikzpgf manual.

    – Raaja
    18 hours ago















8














Welcome to TeX.SE. From the next time try adding a compilable MWE, so that it will attract more users to answer your question.



You can start with (borders):



documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
filldraw [black] (3, 2) --(3,0)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
filldraw [red] (3, 2) --(0,2)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
draw[yellow, thick] (0,0)--(0,2)--(3,2)--(3,0)--cycle;
endtikzpicture
enddocument


to get:



enter image description here



and I leave the rest of customisation for you to do ;).






share|improve this answer

























  • this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

    – Geo
    18 hours ago












  • @Geo you can manually draw the borders around them :) see my updated answer ;)

    – Raaja
    18 hours ago







  • 1





    thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

    – Geo
    18 hours ago











  • @Geo Tikzpgf manual.

    – Raaja
    18 hours ago













8












8








8







Welcome to TeX.SE. From the next time try adding a compilable MWE, so that it will attract more users to answer your question.



You can start with (borders):



documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
filldraw [black] (3, 2) --(3,0)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
filldraw [red] (3, 2) --(0,2)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
draw[yellow, thick] (0,0)--(0,2)--(3,2)--(3,0)--cycle;
endtikzpicture
enddocument


to get:



enter image description here



and I leave the rest of customisation for you to do ;).






share|improve this answer















Welcome to TeX.SE. From the next time try adding a compilable MWE, so that it will attract more users to answer your question.



You can start with (borders):



documentclassstandalone
usepackagetikz
begindocument
begintikzpicture
filldraw [black] (3, 2) --(3,0)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
filldraw [red] (3, 2) --(0,2)--(0,0) plot [smooth, tension=2] coordinates (0,0) (1,1) (2, 1) (3, 2);
draw[yellow, thick] (0,0)--(0,2)--(3,2)--(3,0)--cycle;
endtikzpicture
enddocument


to get:



enter image description here



and I leave the rest of customisation for you to do ;).







share|improve this answer














share|improve this answer



share|improve this answer








edited 18 hours ago

























answered 19 hours ago









RaajaRaaja

5,15421542




5,15421542












  • this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

    – Geo
    18 hours ago












  • @Geo you can manually draw the borders around them :) see my updated answer ;)

    – Raaja
    18 hours ago







  • 1





    thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

    – Geo
    18 hours ago











  • @Geo Tikzpgf manual.

    – Raaja
    18 hours ago

















  • this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

    – Geo
    18 hours ago












  • @Geo you can manually draw the borders around them :) see my updated answer ;)

    – Raaja
    18 hours ago







  • 1





    thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

    – Geo
    18 hours ago











  • @Geo Tikzpgf manual.

    – Raaja
    18 hours ago
















this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

– Geo
18 hours ago






this has no borders and if I do filldraw [fill = red, draw=black] (0,0) rectangle (5,5); Then the borders are different than tcbox where I have tcbox[sharp corners, boxsep=5mm, boxrule=.5mm]

– Geo
18 hours ago














@Geo you can manually draw the borders around them :) see my updated answer ;)

– Raaja
18 hours ago






@Geo you can manually draw the borders around them :) see my updated answer ;)

– Raaja
18 hours ago





1




1





thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

– Geo
18 hours ago





thanks, I also did filldraw [fill = red, draw=black] [sharp corners,line width=.5mm, inner sep=5mm] (0,0) rectangle (5,5); What I do not understand is the coordinates, in order to change the shape (0,0) (1,1) (2, 1) (3, 2) Can you point me where can I read more about it?

– Geo
18 hours ago













@Geo Tikzpgf manual.

– Raaja
18 hours ago





@Geo Tikzpgf manual.

– Raaja
18 hours ago










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









draft saved

draft discarded


















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












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











Geo 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%2f480219%2fbox-half-filled-color%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

Sum ergo cogito? 1 nng

三茅街道4182Guuntc Dn precexpngmageondP