How to rename pi as another value only for y axis without affecting pi used in x axis?How to remove PSTricks dictionary or library codes in an EPS file produced by dvips?How to express a polar coordinate for a macro that only accepts space-separated values?How to pass a macro as a value for a key?
Why is unzipped directory exactly 4.0k (much smaller than zipped file)?
What is the difference between LORD and GOD?
Why do the i8080 I/O instructions take a byte-sized operand to determine the port?
Why did other houses not demand this?
Are runways booked by airlines to land their planes?
Is "vegetable base" a common term in English?
Why does the hash of infinity have the digits of π?
Navigating a quick return to previous employer
Using too much dialogue?
Is there an idiom that means that you are in a very strong negotiation position in a negotiation?
Freedom of Speech and Assembly in China
How to deceive the MC
Finding all files with a given extension whose base name is the name of the parent directory
Why does the Starter Set wizard have six spells in their spellbook?
How would a developer who mostly fixed bugs for years at a company call out their contributions in their CV?
Burned out due to current job, Can I take a week of vacation between jobs?
Why was this character made Grand Maester?
What is the use case for non-breathable waterproof pants?
The disk image is 497GB smaller than the target device
How to melt snow without fire or using body heat?
Why would a rational buyer offer to buy with no conditions precedent?
How to teach an undergraduate course without having taken that course formally before?
Interpreation ROC AUC score
“For nothing” = “pour rien”?
How to rename pi as another value only for y axis without affecting pi used in x axis?
How to remove PSTricks dictionary or library codes in an EPS file produced by dvips?How to express a polar coordinate for a macro that only accepts space-separated values?How to pass a macro as a value for a key?
Case 1
The labels in y axis are multiples of fracsqrt33 while the labels in x axis are multiples of fracpi4.
I want to rename pi as sqrt3 only for y axis without affecting the original meaning of pi used in x axis. How to do so?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
Case 2
Red-Cloud's answer works for the first case in which the constant is sqrt3. Unfortunately, if I change to 1, the output does not make sense as follows. Instead of making an new question, could you make it work as well for 1?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConst1%root(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTop2*Const
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpi1pst@@VLabels
makeatother
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
pstricks pst-plot
add a comment |
Case 1
The labels in y axis are multiples of fracsqrt33 while the labels in x axis are multiples of fracpi4.
I want to rename pi as sqrt3 only for y axis without affecting the original meaning of pi used in x axis. How to do so?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
Case 2
Red-Cloud's answer works for the first case in which the constant is sqrt3. Unfortunately, if I change to 1, the output does not make sense as follows. Instead of making an new question, could you make it work as well for 1?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConst1%root(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTop2*Const
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpi1pst@@VLabels
makeatother
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
pstricks pst-plot
add a comment |
Case 1
The labels in y axis are multiples of fracsqrt33 while the labels in x axis are multiples of fracpi4.
I want to rename pi as sqrt3 only for y axis without affecting the original meaning of pi used in x axis. How to do so?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
Case 2
Red-Cloud's answer works for the first case in which the constant is sqrt3. Unfortunately, if I change to 1, the output does not make sense as follows. Instead of making an new question, could you make it work as well for 1?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConst1%root(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTop2*Const
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpi1pst@@VLabels
makeatother
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
pstricks pst-plot
Case 1
The labels in y axis are multiples of fracsqrt33 while the labels in x axis are multiples of fracpi4.
I want to rename pi as sqrt3 only for y axis without affecting the original meaning of pi used in x axis. How to do so?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
Case 2
Red-Cloud's answer works for the first case in which the constant is sqrt3. Unfortunately, if I change to 1, the output does not make sense as follows. Instead of making an new question, could you make it work as well for 1?

documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConst1%root(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTop2*Const
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpi1pst@@VLabels
makeatother
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
pstricks pst-plot
pstricks pst-plot
edited May 9 at 18:51
Phelype Oleinik
27.8k64794
27.8k64794
asked May 9 at 15:54
Artificial Odorless ArmpitArtificial Odorless Armpit
5,44611343
5,44611343
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpisqrt3pst@@VLabels
makeatother
begindocument
[...]
enddocument
page 39 of thepst-plotdocumentation
– Red-Cloud
May 9 at 19:43
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
add a comment |
I don't think there is (that is, I didn't find) a built-in way to do that. With etoolbox you can patch the code for the x and y labels to add arbitrary definitions:
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
then you just need:
pssetExecuteBeforeYLabels=defpisqrt3
Full code:
documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
ExecuteBeforeYLabels=defpisqrt3,
% ExecuteBeforeXLabels=defpisqrt3,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
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
);
);
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%2ftex.stackexchange.com%2fquestions%2f489995%2fhow-to-rename-pi-as-another-value-only-for-y-axis-without-affecting-pi-used-in%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
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpisqrt3pst@@VLabels
makeatother
begindocument
[...]
enddocument
page 39 of thepst-plotdocumentation
– Red-Cloud
May 9 at 19:43
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
add a comment |
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpisqrt3pst@@VLabels
makeatother
begindocument
[...]
enddocument
page 39 of thepst-plotdocumentation
– Red-Cloud
May 9 at 19:43
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
add a comment |
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpisqrt3pst@@VLabels
makeatother
begindocument
[...]
enddocument
makeatletter
letpst@@VLabelspst@@vlabels
defpst@@vlabelsdefpisqrt3pst@@VLabels
makeatother
begindocument
[...]
enddocument
answered May 9 at 17:53
Red-CloudRed-Cloud
2,69314
2,69314
page 39 of thepst-plotdocumentation
– Red-Cloud
May 9 at 19:43
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
add a comment |
page 39 of thepst-plotdocumentation
– Red-Cloud
May 9 at 19:43
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
page 39 of the
pst-plot documentation– Red-Cloud
May 9 at 19:43
page 39 of the
pst-plot documentation– Red-Cloud
May 9 at 19:43
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
Thank you very much!
– Artificial Odorless Armpit
May 9 at 19:48
add a comment |
I don't think there is (that is, I didn't find) a built-in way to do that. With etoolbox you can patch the code for the x and y labels to add arbitrary definitions:
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
then you just need:
pssetExecuteBeforeYLabels=defpisqrt3
Full code:
documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
ExecuteBeforeYLabels=defpisqrt3,
% ExecuteBeforeXLabels=defpisqrt3,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
add a comment |
I don't think there is (that is, I didn't find) a built-in way to do that. With etoolbox you can patch the code for the x and y labels to add arbitrary definitions:
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
then you just need:
pssetExecuteBeforeYLabels=defpisqrt3
Full code:
documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
ExecuteBeforeYLabels=defpisqrt3,
% ExecuteBeforeXLabels=defpisqrt3,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
add a comment |
I don't think there is (that is, I didn't find) a built-in way to do that. With etoolbox you can patch the code for the x and y labels to add arbitrary definitions:
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
then you just need:
pssetExecuteBeforeYLabels=defpisqrt3
Full code:
documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
ExecuteBeforeYLabels=defpisqrt3,
% ExecuteBeforeXLabels=defpisqrt3,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
I don't think there is (that is, I didn't find) a built-in way to do that. With etoolbox you can patch the code for the x and y labels to add arbitrary definitions:
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
then you just need:
pssetExecuteBeforeYLabels=defpisqrt3
Full code:
documentclass[pstricks,border=3pt 3pt 15pt 15pt,12pt]standalone
usepackagepst-plot,pst-calculate
usepackage[nomessages]fp
FPsetEPSILON0.3
FPevalConstroot(2,3)
FPevalLeft0-pi
FPevalRight2*pi
FPevalTopConst
FPevalBottom0-Const
FPsetxTrigLabelBase4
FPsetyTrigLabelBase3
FPsetDx1
FPsetDy1
FPevaldxpi/xTrigLabelBase*Dx
FPevaldyConst/yTrigLabelBase*Dy
FPevalXUnit15/(Right-Left)
FPevalYUnit6/(Top-Bottom)
usepackageetoolbox
makeatletter
patchcmdpst@@vlabels
vbox to -psk@ylabelOffset
YAxis@labelHook@codevbox to -psk@ylabelOffset
FailedToPatch
define@key[psset]pst-plotExecuteBeforeYLabels[]defYAxis@labelHook@code#1
patchcmdpst@@hlabels
ifcasepsk@xlabelPos
XAxis@labelHook@codeifcasepsk@xlabelPos
FailedToPatch
define@key[psset]pst-plotExecuteBeforeXLabels[]defXAxis@labelHook@code#1
psset
ExecuteBeforeYLabels=,
ExecuteBeforeXLabels=,
makeatother
psset
xunit=XUnit,
yunit=YUnit,
dx=dx,
Dx=Dx,
dy=dy,
Dy=Dy,
xtrigLabels,
ytrigLabels,
xtrigLabelBase=xTrigLabelBase,
ytrigLabelBase=yTrigLabelBase,
showorigin=false,
ExecuteBeforeYLabels=defpisqrt3,
% ExecuteBeforeXLabels=defpisqrt3,
begindocument
beginpspicture(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)
psplot[algebraic,linecolor=red,plotpoints=100,linewidth=2pslinewidth]LeftRightConst*sin(x)
%defpisqrt3
psaxes<->(0,0)(pscalculateLeft-EPSILON,pscalculateBottom-EPSILON)(pscalculateRight+EPSILON,pscalculateTop+EPSILON)[$x$,0][$y$,90]
endpspicture
enddocument
answered May 9 at 17:17
Phelype OleinikPhelype Oleinik
27.8k64794
27.8k64794
add a comment |
add a comment |
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');
);
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%2f489995%2fhow-to-rename-pi-as-another-value-only-for-y-axis-without-affecting-pi-used-in%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
