Bold text in text of the axis in R using TeX()
How to render bold text in plot in R using TeX
?
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ bold text"), ylab=TeX("$\alpha^2$ bold text"))
I tried TeX("$\alpha$ textbf{bold text}")
and TeX("$\alpha$ $textbf{bold text}$")
without success
r fonts latex tex
add a comment |
How to render bold text in plot in R using TeX
?
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ bold text"), ylab=TeX("$\alpha^2$ bold text"))
I tried TeX("$\alpha$ textbf{bold text}")
and TeX("$\alpha$ $textbf{bold text}$")
without success
r fonts latex tex
Possible duplicate of How to make beta italic and bold in axis label and P italic and bold in text
– M-M
Nov 20 '18 at 21:31
stackoverflow.com/questions/1395105/getting-latex-into-r-plots
– M-M
Nov 20 '18 at 21:33
Thank you for your comment Masoud
– ecjb
Nov 21 '18 at 21:35
1
For those who downvoted my question, I would be glad to have the reason why the question was downvoted: If 1. the style of the question or the accuracy of the question is not good enough, just write it : I'm very eager to learn and improve how to write better questions. If it’s 2. because the question is a duplicate, just write as an answer: I would more than glad to upvote it and accept it as an answer. If 3. there is another reason that I didn’t get please write it as well. But I must say that I find the attitude of just downvoting “for free” without any explanation irritating and useless
– ecjb
Nov 21 '18 at 21:46
add a comment |
How to render bold text in plot in R using TeX
?
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ bold text"), ylab=TeX("$\alpha^2$ bold text"))
I tried TeX("$\alpha$ textbf{bold text}")
and TeX("$\alpha$ $textbf{bold text}$")
without success
r fonts latex tex
How to render bold text in plot in R using TeX
?
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ bold text"), ylab=TeX("$\alpha^2$ bold text"))
I tried TeX("$\alpha$ textbf{bold text}")
and TeX("$\alpha$ $textbf{bold text}$")
without success
r fonts latex tex
r fonts latex tex
asked Nov 20 '18 at 21:23
ecjbecjb
349315
349315
Possible duplicate of How to make beta italic and bold in axis label and P italic and bold in text
– M-M
Nov 20 '18 at 21:31
stackoverflow.com/questions/1395105/getting-latex-into-r-plots
– M-M
Nov 20 '18 at 21:33
Thank you for your comment Masoud
– ecjb
Nov 21 '18 at 21:35
1
For those who downvoted my question, I would be glad to have the reason why the question was downvoted: If 1. the style of the question or the accuracy of the question is not good enough, just write it : I'm very eager to learn and improve how to write better questions. If it’s 2. because the question is a duplicate, just write as an answer: I would more than glad to upvote it and accept it as an answer. If 3. there is another reason that I didn’t get please write it as well. But I must say that I find the attitude of just downvoting “for free” without any explanation irritating and useless
– ecjb
Nov 21 '18 at 21:46
add a comment |
Possible duplicate of How to make beta italic and bold in axis label and P italic and bold in text
– M-M
Nov 20 '18 at 21:31
stackoverflow.com/questions/1395105/getting-latex-into-r-plots
– M-M
Nov 20 '18 at 21:33
Thank you for your comment Masoud
– ecjb
Nov 21 '18 at 21:35
1
For those who downvoted my question, I would be glad to have the reason why the question was downvoted: If 1. the style of the question or the accuracy of the question is not good enough, just write it : I'm very eager to learn and improve how to write better questions. If it’s 2. because the question is a duplicate, just write as an answer: I would more than glad to upvote it and accept it as an answer. If 3. there is another reason that I didn’t get please write it as well. But I must say that I find the attitude of just downvoting “for free” without any explanation irritating and useless
– ecjb
Nov 21 '18 at 21:46
Possible duplicate of How to make beta italic and bold in axis label and P italic and bold in text
– M-M
Nov 20 '18 at 21:31
Possible duplicate of How to make beta italic and bold in axis label and P italic and bold in text
– M-M
Nov 20 '18 at 21:31
stackoverflow.com/questions/1395105/getting-latex-into-r-plots
– M-M
Nov 20 '18 at 21:33
stackoverflow.com/questions/1395105/getting-latex-into-r-plots
– M-M
Nov 20 '18 at 21:33
Thank you for your comment Masoud
– ecjb
Nov 21 '18 at 21:35
Thank you for your comment Masoud
– ecjb
Nov 21 '18 at 21:35
1
1
For those who downvoted my question, I would be glad to have the reason why the question was downvoted: If 1. the style of the question or the accuracy of the question is not good enough, just write it : I'm very eager to learn and improve how to write better questions. If it’s 2. because the question is a duplicate, just write as an answer: I would more than glad to upvote it and accept it as an answer. If 3. there is another reason that I didn’t get please write it as well. But I must say that I find the attitude of just downvoting “for free” without any explanation irritating and useless
– ecjb
Nov 21 '18 at 21:46
For those who downvoted my question, I would be glad to have the reason why the question was downvoted: If 1. the style of the question or the accuracy of the question is not good enough, just write it : I'm very eager to learn and improve how to write better questions. If it’s 2. because the question is a duplicate, just write as an answer: I would more than glad to upvote it and accept it as an answer. If 3. there is another reason that I didn’t get please write it as well. But I must say that I find the attitude of just downvoting “for free” without any explanation irritating and useless
– ecjb
Nov 21 '18 at 21:46
add a comment |
1 Answer
1
active
oldest
votes
library(latex2exp)
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ \textbf{bold text}"), ylab=TeX("$\alpha^2$ \textbf{bold text}"))
You need to use double slash in front of the command, then you will get the result:
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fstackoverflow.com%2fquestions%2f53401738%2fbold-text-in-text-of-the-axis-in-r-using-tex%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
library(latex2exp)
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ \textbf{bold text}"), ylab=TeX("$\alpha^2$ \textbf{bold text}"))
You need to use double slash in front of the command, then you will get the result:
add a comment |
library(latex2exp)
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ \textbf{bold text}"), ylab=TeX("$\alpha^2$ \textbf{bold text}"))
You need to use double slash in front of the command, then you will get the result:
add a comment |
library(latex2exp)
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ \textbf{bold text}"), ylab=TeX("$\alpha^2$ \textbf{bold text}"))
You need to use double slash in front of the command, then you will get the result:
library(latex2exp)
TeX("$\alpha$")
TeX("The ratio of 1 and 2 is $\frac{1}{2}$")
a <- 1:100
plot(a, a^2, xlab=TeX("$\alpha$ \textbf{bold text}"), ylab=TeX("$\alpha^2$ \textbf{bold text}"))
You need to use double slash in front of the command, then you will get the result:
answered Nov 20 '18 at 21:34
m0nhawkm0nhawk
15.5k83160
15.5k83160
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53401738%2fbold-text-in-text-of-the-axis-in-r-using-tex%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
Possible duplicate of How to make beta italic and bold in axis label and P italic and bold in text
– M-M
Nov 20 '18 at 21:31
stackoverflow.com/questions/1395105/getting-latex-into-r-plots
– M-M
Nov 20 '18 at 21:33
Thank you for your comment Masoud
– ecjb
Nov 21 '18 at 21:35
1
For those who downvoted my question, I would be glad to have the reason why the question was downvoted: If 1. the style of the question or the accuracy of the question is not good enough, just write it : I'm very eager to learn and improve how to write better questions. If it’s 2. because the question is a duplicate, just write as an answer: I would more than glad to upvote it and accept it as an answer. If 3. there is another reason that I didn’t get please write it as well. But I must say that I find the attitude of just downvoting “for free” without any explanation irritating and useless
– ecjb
Nov 21 '18 at 21:46