Modify Axes Range
$begingroup$
With the following code:
arc = Graphics[{Arrowheads[{0, 0.04}],
GraphicsComplex[
Table[{0.5 + 0.7 Re[Exp[I*g]], 0.5 + 0.7 Im[Exp[I*g]]}, {g,
Subdivide[0, Pi/2 - Pi/6, 100]}], Arrow[Range[101]]]}];
sensor = Graphics[
Circle[{0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}, 0.03]];
sensorM =
Graphics[Style[Text["M" , {1, 1.47}], FontSize -> 18,
FontFamily -> "Latin Modern Roman"]];
Omega0 = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (0)])" , {0.2,
1.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
OmegaE = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (e)])" , {0.8,
-0.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
theta = Graphics[
Style[Text["[Theta]" , {1.2, 0.77}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
rpolar = Graphics[
Style[Text["r" , {0.85, 1.17}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
er = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] + 0.3 Cos[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Sin[Pi/3]}}]];
etheta = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] - 0.3 Sin[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Cos[Pi/3]}}]];
erUnit = Graphics[
Style[Text[Subscript[OverHat[e], r], {1.25, 1.55}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
erthetaUnit =
Graphics[Style[Text[Subscript[OverHat[e], [Theta]], {0.75, 1.65}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
h = Graphics[
Line[{{{-1, 1/2}, {0, 0}, {-1, -1/2}}, {{0, 1/2}, {1,
0}, {0, -1/2}}, {{1, 1/2}, {2, 0}, {1, -1/2}}}]];
propVector =
Graphics[{Arrowheads[{{Automatic, Automatic, h}}],
Arrow[{{-1., 0.5}, {-0.5, 0.5}}]}];
lines = Graphics[{Line[{{-0.8, 0.2}, {-0.8, 0.8}}],
Line[{{-0.75, 0.2}, {-0.75, 0.8}}]}];
pinc = Graphics[
Style[Text["!(*SubscriptBox[(p), (inc)])", {-0.95, 0.75}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Axes -> True, AxesOrigin -> {0.5, 0.5},
AxesLabel -> {Style["x", FontSize -> 20,
FontFamily -> "Latin Modern Roman", FontColor -> Black],
Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black]}, AxesStyle -> Arrowheads[{0, 0.05}],
PlotRange -> All]
I produced the following image
Eventually, I will get rid of AxesTicks
, but I leave them for reference. I am puzzled how I can modify the Axes Range. For instance, the x-axis should range from -0.3 to 1.3 and similarly for the y-axis. The AxesLabel
should be moved accordingly but the rest of the figure should not be modified.
Thanks in advance!
plotting graphics
$endgroup$
add a comment |
$begingroup$
With the following code:
arc = Graphics[{Arrowheads[{0, 0.04}],
GraphicsComplex[
Table[{0.5 + 0.7 Re[Exp[I*g]], 0.5 + 0.7 Im[Exp[I*g]]}, {g,
Subdivide[0, Pi/2 - Pi/6, 100]}], Arrow[Range[101]]]}];
sensor = Graphics[
Circle[{0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}, 0.03]];
sensorM =
Graphics[Style[Text["M" , {1, 1.47}], FontSize -> 18,
FontFamily -> "Latin Modern Roman"]];
Omega0 = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (0)])" , {0.2,
1.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
OmegaE = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (e)])" , {0.8,
-0.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
theta = Graphics[
Style[Text["[Theta]" , {1.2, 0.77}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
rpolar = Graphics[
Style[Text["r" , {0.85, 1.17}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
er = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] + 0.3 Cos[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Sin[Pi/3]}}]];
etheta = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] - 0.3 Sin[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Cos[Pi/3]}}]];
erUnit = Graphics[
Style[Text[Subscript[OverHat[e], r], {1.25, 1.55}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
erthetaUnit =
Graphics[Style[Text[Subscript[OverHat[e], [Theta]], {0.75, 1.65}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
h = Graphics[
Line[{{{-1, 1/2}, {0, 0}, {-1, -1/2}}, {{0, 1/2}, {1,
0}, {0, -1/2}}, {{1, 1/2}, {2, 0}, {1, -1/2}}}]];
propVector =
Graphics[{Arrowheads[{{Automatic, Automatic, h}}],
Arrow[{{-1., 0.5}, {-0.5, 0.5}}]}];
lines = Graphics[{Line[{{-0.8, 0.2}, {-0.8, 0.8}}],
Line[{{-0.75, 0.2}, {-0.75, 0.8}}]}];
pinc = Graphics[
Style[Text["!(*SubscriptBox[(p), (inc)])", {-0.95, 0.75}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Axes -> True, AxesOrigin -> {0.5, 0.5},
AxesLabel -> {Style["x", FontSize -> 20,
FontFamily -> "Latin Modern Roman", FontColor -> Black],
Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black]}, AxesStyle -> Arrowheads[{0, 0.05}],
PlotRange -> All]
I produced the following image
Eventually, I will get rid of AxesTicks
, but I leave them for reference. I am puzzled how I can modify the Axes Range. For instance, the x-axis should range from -0.3 to 1.3 and similarly for the y-axis. The AxesLabel
should be moved accordingly but the rest of the figure should not be modified.
Thanks in advance!
plotting graphics
$endgroup$
1
$begingroup$
usePlotRange -> {{-.3, 1.3}, {-.3, 1.3}}
, and add the optionImagePadding -> Scaled[.1]
?
$endgroup$
– kglr
3 hours ago
$begingroup$
@kglr Thanks a lot! But now, unfortunately, one of the vertical lines on the left disappears.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr If we modify theScaled
to 0.15 we get the whole figure but minimized I have to addImageSize -> 400
to get a bigger Figure but I do not know if this is the proper technique.
$endgroup$
– dimitris
3 hours ago
$begingroup$
dimitris, i posted an answer using an alternative approach.
$endgroup$
– kglr
3 hours ago
add a comment |
$begingroup$
With the following code:
arc = Graphics[{Arrowheads[{0, 0.04}],
GraphicsComplex[
Table[{0.5 + 0.7 Re[Exp[I*g]], 0.5 + 0.7 Im[Exp[I*g]]}, {g,
Subdivide[0, Pi/2 - Pi/6, 100]}], Arrow[Range[101]]]}];
sensor = Graphics[
Circle[{0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}, 0.03]];
sensorM =
Graphics[Style[Text["M" , {1, 1.47}], FontSize -> 18,
FontFamily -> "Latin Modern Roman"]];
Omega0 = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (0)])" , {0.2,
1.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
OmegaE = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (e)])" , {0.8,
-0.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
theta = Graphics[
Style[Text["[Theta]" , {1.2, 0.77}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
rpolar = Graphics[
Style[Text["r" , {0.85, 1.17}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
er = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] + 0.3 Cos[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Sin[Pi/3]}}]];
etheta = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] - 0.3 Sin[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Cos[Pi/3]}}]];
erUnit = Graphics[
Style[Text[Subscript[OverHat[e], r], {1.25, 1.55}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
erthetaUnit =
Graphics[Style[Text[Subscript[OverHat[e], [Theta]], {0.75, 1.65}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
h = Graphics[
Line[{{{-1, 1/2}, {0, 0}, {-1, -1/2}}, {{0, 1/2}, {1,
0}, {0, -1/2}}, {{1, 1/2}, {2, 0}, {1, -1/2}}}]];
propVector =
Graphics[{Arrowheads[{{Automatic, Automatic, h}}],
Arrow[{{-1., 0.5}, {-0.5, 0.5}}]}];
lines = Graphics[{Line[{{-0.8, 0.2}, {-0.8, 0.8}}],
Line[{{-0.75, 0.2}, {-0.75, 0.8}}]}];
pinc = Graphics[
Style[Text["!(*SubscriptBox[(p), (inc)])", {-0.95, 0.75}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Axes -> True, AxesOrigin -> {0.5, 0.5},
AxesLabel -> {Style["x", FontSize -> 20,
FontFamily -> "Latin Modern Roman", FontColor -> Black],
Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black]}, AxesStyle -> Arrowheads[{0, 0.05}],
PlotRange -> All]
I produced the following image
Eventually, I will get rid of AxesTicks
, but I leave them for reference. I am puzzled how I can modify the Axes Range. For instance, the x-axis should range from -0.3 to 1.3 and similarly for the y-axis. The AxesLabel
should be moved accordingly but the rest of the figure should not be modified.
Thanks in advance!
plotting graphics
$endgroup$
With the following code:
arc = Graphics[{Arrowheads[{0, 0.04}],
GraphicsComplex[
Table[{0.5 + 0.7 Re[Exp[I*g]], 0.5 + 0.7 Im[Exp[I*g]]}, {g,
Subdivide[0, Pi/2 - Pi/6, 100]}], Arrow[Range[101]]]}];
sensor = Graphics[
Circle[{0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}, 0.03]];
sensorM =
Graphics[Style[Text["M" , {1, 1.47}], FontSize -> 18,
FontFamily -> "Latin Modern Roman"]];
Omega0 = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (0)])" , {0.2,
1.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
OmegaE = Graphics[
Style[Text[
"!(*SuperscriptBox[([CapitalOmega]), (e)])" , {0.8,
-0.27}], FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
theta = Graphics[
Style[Text["[Theta]" , {1.2, 0.77}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
rpolar = Graphics[
Style[Text["r" , {0.85, 1.17}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
er = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] + 0.3 Cos[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Sin[Pi/3]}}]];
etheta = Graphics[
Arrow[{{0.5 + 1. Cos[Pi/3],
0.5 + 1. Sin[Pi/3]}, {0.5 + 1. Cos[Pi/3] - 0.3 Sin[Pi/3],
0.5 + 1. Sin[Pi/3] + 0.3 Cos[Pi/3]}}]];
erUnit = Graphics[
Style[Text[Subscript[OverHat[e], r], {1.25, 1.55}], FontSize -> 20,
FontFamily -> "Latin Modern Roman"]];
erthetaUnit =
Graphics[Style[Text[Subscript[OverHat[e], [Theta]], {0.75, 1.65}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
h = Graphics[
Line[{{{-1, 1/2}, {0, 0}, {-1, -1/2}}, {{0, 1/2}, {1,
0}, {0, -1/2}}, {{1, 1/2}, {2, 0}, {1, -1/2}}}]];
propVector =
Graphics[{Arrowheads[{{Automatic, Automatic, h}}],
Arrow[{{-1., 0.5}, {-0.5, 0.5}}]}];
lines = Graphics[{Line[{{-0.8, 0.2}, {-0.8, 0.8}}],
Line[{{-0.75, 0.2}, {-0.75, 0.8}}]}];
pinc = Graphics[
Style[Text["!(*SubscriptBox[(p), (inc)])", {-0.95, 0.75}],
FontSize -> 20, FontFamily -> "Latin Modern Roman"]];
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Axes -> True, AxesOrigin -> {0.5, 0.5},
AxesLabel -> {Style["x", FontSize -> 20,
FontFamily -> "Latin Modern Roman", FontColor -> Black],
Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black]}, AxesStyle -> Arrowheads[{0, 0.05}],
PlotRange -> All]
I produced the following image
Eventually, I will get rid of AxesTicks
, but I leave them for reference. I am puzzled how I can modify the Axes Range. For instance, the x-axis should range from -0.3 to 1.3 and similarly for the y-axis. The AxesLabel
should be moved accordingly but the rest of the figure should not be modified.
Thanks in advance!
plotting graphics
plotting graphics
asked 3 hours ago
dimitrisdimitris
2,1431331
2,1431331
1
$begingroup$
usePlotRange -> {{-.3, 1.3}, {-.3, 1.3}}
, and add the optionImagePadding -> Scaled[.1]
?
$endgroup$
– kglr
3 hours ago
$begingroup$
@kglr Thanks a lot! But now, unfortunately, one of the vertical lines on the left disappears.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr If we modify theScaled
to 0.15 we get the whole figure but minimized I have to addImageSize -> 400
to get a bigger Figure but I do not know if this is the proper technique.
$endgroup$
– dimitris
3 hours ago
$begingroup$
dimitris, i posted an answer using an alternative approach.
$endgroup$
– kglr
3 hours ago
add a comment |
1
$begingroup$
usePlotRange -> {{-.3, 1.3}, {-.3, 1.3}}
, and add the optionImagePadding -> Scaled[.1]
?
$endgroup$
– kglr
3 hours ago
$begingroup$
@kglr Thanks a lot! But now, unfortunately, one of the vertical lines on the left disappears.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr If we modify theScaled
to 0.15 we get the whole figure but minimized I have to addImageSize -> 400
to get a bigger Figure but I do not know if this is the proper technique.
$endgroup$
– dimitris
3 hours ago
$begingroup$
dimitris, i posted an answer using an alternative approach.
$endgroup$
– kglr
3 hours ago
1
1
$begingroup$
use
PlotRange -> {{-.3, 1.3}, {-.3, 1.3}}
, and add the option ImagePadding -> Scaled[.1]
?$endgroup$
– kglr
3 hours ago
$begingroup$
use
PlotRange -> {{-.3, 1.3}, {-.3, 1.3}}
, and add the option ImagePadding -> Scaled[.1]
?$endgroup$
– kglr
3 hours ago
$begingroup$
@kglr Thanks a lot! But now, unfortunately, one of the vertical lines on the left disappears.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr Thanks a lot! But now, unfortunately, one of the vertical lines on the left disappears.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr If we modify the
Scaled
to 0.15 we get the whole figure but minimized I have to add ImageSize -> 400
to get a bigger Figure but I do not know if this is the proper technique.$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr If we modify the
Scaled
to 0.15 we get the whole figure but minimized I have to add ImageSize -> 400
to get a bigger Figure but I do not know if this is the proper technique.$endgroup$
– dimitris
3 hours ago
$begingroup$
dimitris, i posted an answer using an alternative approach.
$endgroup$
– kglr
3 hours ago
$begingroup$
dimitris, i posted an answer using an alternative approach.
$endgroup$
– kglr
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Remove the axes and add the arrow and text primitives in the desired location:
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Graphics[{Arrowheads[{0, 0.05}], Arrow[{{-.3, .5}, {1.3, .5}}],
Arrow[{{.5, -.3}, {.5, 1.3}}],
Text[Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {.5, 1.4}],
Text[Style["x", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {1.4, .5}]}],
Axes -> False, PlotRange -> All]
$endgroup$
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs'sMatex
package very useful ( see this)
$endgroup$
– kglr
3 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
add a comment |
$begingroup$
This is basically the same a what kglr posted, but it is structured so that making adjustments to the axis graphics is easy. In particular, using Offset
makes very easy to adjust the position of the axis labels, since the adjustment is made in printer's points and thus independent of the coordinate system.
axes =
Module[{axesLblF, xAxisPts, yAxisPts, xLbl, yLbl},
axesLblF = (Style[#, 20, "TR"] &);
xAxisPts = {{-.3, .5}, {1.3, .5}};
yAxisPts = {{.5, -.3}, {.5, 1.3}};
xLbl = Text[axesLblF @ "x", Offset[{10, 0}, xAxisPts[[2]]]];
yLbl = Text[axesLblF @ "y", Offset[{0, 10}, yAxisPts[[2]]]];
Graphics[{Arrowheads[{0, 0.05}], Arrow[xAxisPts], xLbl, Arrow[yAxisPts], yLbl}]]
Show[
Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]],
arc, sensor, sensorM, Omega0, OmegaE, theta, rpolar, er, etheta,
erUnit, lines, propVector, pinc, erthetaUnit,
Graphics[
{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}],
axes,
PlotRange -> All]
Note: I use the Times Roman font ("TR") because I do not have "Latin Modern Roman" on my system.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
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
});
}
});
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%2fmathematica.stackexchange.com%2fquestions%2f190882%2fmodify-axes-range%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
$begingroup$
Remove the axes and add the arrow and text primitives in the desired location:
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Graphics[{Arrowheads[{0, 0.05}], Arrow[{{-.3, .5}, {1.3, .5}}],
Arrow[{{.5, -.3}, {.5, 1.3}}],
Text[Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {.5, 1.4}],
Text[Style["x", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {1.4, .5}]}],
Axes -> False, PlotRange -> All]
$endgroup$
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs'sMatex
package very useful ( see this)
$endgroup$
– kglr
3 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
add a comment |
$begingroup$
Remove the axes and add the arrow and text primitives in the desired location:
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Graphics[{Arrowheads[{0, 0.05}], Arrow[{{-.3, .5}, {1.3, .5}}],
Arrow[{{.5, -.3}, {.5, 1.3}}],
Text[Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {.5, 1.4}],
Text[Style["x", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {1.4, .5}]}],
Axes -> False, PlotRange -> All]
$endgroup$
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs'sMatex
package very useful ( see this)
$endgroup$
– kglr
3 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
add a comment |
$begingroup$
Remove the axes and add the arrow and text primitives in the desired location:
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Graphics[{Arrowheads[{0, 0.05}], Arrow[{{-.3, .5}, {1.3, .5}}],
Arrow[{{.5, -.3}, {.5, 1.3}}],
Text[Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {.5, 1.4}],
Text[Style["x", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {1.4, .5}]}],
Axes -> False, PlotRange -> All]
$endgroup$
Remove the axes and add the arrow and text primitives in the desired location:
Show[{Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]], arc, sensor, sensorM, Omega0,
OmegaE, theta, rpolar, er, etheta, erUnit, lines, propVector, pinc,
erthetaUnit,
Graphics[{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}]},
Graphics[{Arrowheads[{0, 0.05}], Arrow[{{-.3, .5}, {1.3, .5}}],
Arrow[{{.5, -.3}, {.5, 1.3}}],
Text[Style["y", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {.5, 1.4}],
Text[Style["x", FontSize -> 20, FontFamily -> "Latin Modern Roman",
FontColor -> Black], {1.4, .5}]}],
Axes -> False, PlotRange -> All]
answered 3 hours ago
kglrkglr
182k10200413
182k10200413
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs'sMatex
package very useful ( see this)
$endgroup$
– kglr
3 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
add a comment |
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs'sMatex
package very useful ( see this)
$endgroup$
– kglr
3 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
Thank you very much! I use Mathematica a lot for visualisations but I am wondering if a Figure like the current could pass the typical journal publication requirements.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs's
Matex
package very useful ( see this)$endgroup$
– kglr
3 hours ago
$begingroup$
@dimitris, my pleasure. Thank you for the accept. It looks better than many pictures I have seen in quite a few journals:) If you haven't already seen it you will find Szabolcs's
Matex
package very useful ( see this)$endgroup$
– kglr
3 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
$begingroup$
Actually I found Szabolc's package several minutes before posting my question. I saw the description and the download page but I was very tired to try it:-)! Thanks in any case because I was not familiar with the linked question!
$endgroup$
– dimitris
2 hours ago
add a comment |
$begingroup$
This is basically the same a what kglr posted, but it is structured so that making adjustments to the axis graphics is easy. In particular, using Offset
makes very easy to adjust the position of the axis labels, since the adjustment is made in printer's points and thus independent of the coordinate system.
axes =
Module[{axesLblF, xAxisPts, yAxisPts, xLbl, yLbl},
axesLblF = (Style[#, 20, "TR"] &);
xAxisPts = {{-.3, .5}, {1.3, .5}};
yAxisPts = {{.5, -.3}, {.5, 1.3}};
xLbl = Text[axesLblF @ "x", Offset[{10, 0}, xAxisPts[[2]]]];
yLbl = Text[axesLblF @ "y", Offset[{0, 10}, yAxisPts[[2]]]];
Graphics[{Arrowheads[{0, 0.05}], Arrow[xAxisPts], xLbl, Arrow[yAxisPts], yLbl}]]
Show[
Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]],
arc, sensor, sensorM, Omega0, OmegaE, theta, rpolar, er, etheta,
erUnit, lines, propVector, pinc, erthetaUnit,
Graphics[
{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}],
axes,
PlotRange -> All]
Note: I use the Times Roman font ("TR") because I do not have "Latin Modern Roman" on my system.
$endgroup$
add a comment |
$begingroup$
This is basically the same a what kglr posted, but it is structured so that making adjustments to the axis graphics is easy. In particular, using Offset
makes very easy to adjust the position of the axis labels, since the adjustment is made in printer's points and thus independent of the coordinate system.
axes =
Module[{axesLblF, xAxisPts, yAxisPts, xLbl, yLbl},
axesLblF = (Style[#, 20, "TR"] &);
xAxisPts = {{-.3, .5}, {1.3, .5}};
yAxisPts = {{.5, -.3}, {.5, 1.3}};
xLbl = Text[axesLblF @ "x", Offset[{10, 0}, xAxisPts[[2]]]];
yLbl = Text[axesLblF @ "y", Offset[{0, 10}, yAxisPts[[2]]]];
Graphics[{Arrowheads[{0, 0.05}], Arrow[xAxisPts], xLbl, Arrow[yAxisPts], yLbl}]]
Show[
Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]],
arc, sensor, sensorM, Omega0, OmegaE, theta, rpolar, er, etheta,
erUnit, lines, propVector, pinc, erthetaUnit,
Graphics[
{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}],
axes,
PlotRange -> All]
Note: I use the Times Roman font ("TR") because I do not have "Latin Modern Roman" on my system.
$endgroup$
add a comment |
$begingroup$
This is basically the same a what kglr posted, but it is structured so that making adjustments to the axis graphics is easy. In particular, using Offset
makes very easy to adjust the position of the axis labels, since the adjustment is made in printer's points and thus independent of the coordinate system.
axes =
Module[{axesLblF, xAxisPts, yAxisPts, xLbl, yLbl},
axesLblF = (Style[#, 20, "TR"] &);
xAxisPts = {{-.3, .5}, {1.3, .5}};
yAxisPts = {{.5, -.3}, {.5, 1.3}};
xLbl = Text[axesLblF @ "x", Offset[{10, 0}, xAxisPts[[2]]]];
yLbl = Text[axesLblF @ "y", Offset[{0, 10}, yAxisPts[[2]]]];
Graphics[{Arrowheads[{0, 0.05}], Arrow[xAxisPts], xLbl, Arrow[yAxisPts], yLbl}]]
Show[
Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]],
arc, sensor, sensorM, Omega0, OmegaE, theta, rpolar, er, etheta,
erUnit, lines, propVector, pinc, erthetaUnit,
Graphics[
{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}],
axes,
PlotRange -> All]
Note: I use the Times Roman font ("TR") because I do not have "Latin Modern Roman" on my system.
$endgroup$
This is basically the same a what kglr posted, but it is structured so that making adjustments to the axis graphics is easy. In particular, using Offset
makes very easy to adjust the position of the axis labels, since the adjustment is made in printer's points and thus independent of the coordinate system.
axes =
Module[{axesLblF, xAxisPts, yAxisPts, xLbl, yLbl},
axesLblF = (Style[#, 20, "TR"] &);
xAxisPts = {{-.3, .5}, {1.3, .5}};
yAxisPts = {{.5, -.3}, {.5, 1.3}};
xLbl = Text[axesLblF @ "x", Offset[{10, 0}, xAxisPts[[2]]]];
yLbl = Text[axesLblF @ "y", Offset[{0, 10}, yAxisPts[[2]]]];
Graphics[{Arrowheads[{0, 0.05}], Arrow[xAxisPts], xLbl, Arrow[yAxisPts], yLbl}]]
Show[
Graphics[{Dotted, Circle[{0.5, 0.5}, 1]}],
Graphics[Circle[{0.5, 0.5}, 0.5]],
arc, sensor, sensorM, Omega0, OmegaE, theta, rpolar, er, etheta,
erUnit, lines, propVector, pinc, erthetaUnit,
Graphics[
{DotDashed, Arrowheads[0.04],
Arrow[{{0.5, 0.5}, {0.5 + 1. Cos[Pi/3], 0.5 + 1. Sin[Pi/3]}}]}],
axes,
PlotRange -> All]
Note: I use the Times Roman font ("TR") because I do not have "Latin Modern Roman" on my system.
answered 2 hours ago
m_goldbergm_goldberg
85.7k872196
85.7k872196
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica 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.
Use MathJax to format equations. MathJax reference.
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%2fmathematica.stackexchange.com%2fquestions%2f190882%2fmodify-axes-range%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
1
$begingroup$
use
PlotRange -> {{-.3, 1.3}, {-.3, 1.3}}
, and add the optionImagePadding -> Scaled[.1]
?$endgroup$
– kglr
3 hours ago
$begingroup$
@kglr Thanks a lot! But now, unfortunately, one of the vertical lines on the left disappears.
$endgroup$
– dimitris
3 hours ago
$begingroup$
@kglr If we modify the
Scaled
to 0.15 we get the whole figure but minimized I have to addImageSize -> 400
to get a bigger Figure but I do not know if this is the proper technique.$endgroup$
– dimitris
3 hours ago
$begingroup$
dimitris, i posted an answer using an alternative approach.
$endgroup$
– kglr
3 hours ago