I "draw" two pstricks pictures, one after the other. At the beginning of each of them, I specify the font size (\small
in my example). Then I draw axes, with labelFontSize=\normalsize
, which should result in the same \small
size as the whole picture. I know that this is useless, but I just add it in the code in case I want to change it in the future. However, the font size of the labels are smaller in the first picture than in the second one. Does anyone know why?
I compile with TeXstudio, using XeLaTeX and the chain DVI->PS->PDF (but it does the same with LuaLaTeX, and I doubt that the vizualisation chain would change anything).
Here My code:
\documentclass[12pt]{article}
\usepackage{pstricks}
\usepackage{pst-func}
\usepackage{pstricks-add}
\pagestyle{empty}
\begin{document}
%%%%%%% Fig 1Fp112 - 2023-24 - BEGIN %%%%%%%
\psset{%
xunit=1.2cm,%
yunit=.2cm,%
algebraic=true,%
dotstyle=*,%
dotsize=5pt 0,%
linewidth=.8pt,% default: 0.8pt
arrowsize=3pt 2,%
arrowinset=0.25%
}
\def\xmin{-2.8}
\def\xmax{3.6}
\def\ymin{-8}
\def\ymax{19.7}
\begin{pspicture*}(\xmin,\ymin)(\xmax,\ymax)
\small
\psaxes[%
linewidth=.8pt,%
labelFontSize=\normalsize,%
labelFontSize=\scriptstyle,%
xAxis=true,%
yAxis=true,%
showorigin=false,%
Dx=1,%
Dy=5,%
ticksize=-3pt,%
xsubticks=2,%
ysubticks=5%
]{->}(0,0)(\xmin,\ymin)(\xmax,\ymax)
\uput{.2cm}[120](\xmax,0){$x$}
\uput{.2cm}[-30](0,\ymax){$y$}
\psgrid[%
gridcolor=black,% default: grey
griddots=5,%
gridlabels=0pt,%
subgriddiv=0,%
subgriddots=5,%
xunit=1,%
yunit=5%
](-3,-2)(4,4)
\newcommand\f[1]{%
-5. - 4.48782*#1 + 2.34728*(#1)^2 + 0.891565*(#1)^3 + 0.51223*(#1)^4 + 0.492146*(#1)^5 - 0.0823567*(#1)^6 - 0.0593091*(#1)^7
}% f(x)
\psplot{-2.5}{2.1}{%
\f{x}
}
\psdots(-2.5,-5)(2.1,16.5)
\psline[linewidth=2.4pt](-2.5,0)(2.1,0) % D_f
\uput{.1cm}[-90](0.7,0){$\mathcal{D}_f$} % D_f
\psline[linewidth=2.4pt](0,-6.5)(0,16.5) % V_f
\uput{.1cm}[0](0,12){$\mathcal{V}_f$} % V_f
\psline(-2.1,-3)(-2.1,0)
\uput{.1cm}[-90](-2.1,-3){Zéro}
\psline(-0.85,-3)(-0.85,0)
\uput{.1cm}[-90](-0.85,-3){Zéro}
\psline(1.45,-3)(1.45,0)
\uput{.1cm}[-90](1.45,-3){Zéro}
\psline[linestyle=dashed](-2.5,-5)(-2.5,0)
\psline[linestyle=dashed](-2,0)(-2,1)(0,1)
\psline[linestyle=dashed](0,-6.5)(0.5,-6.5)
\psline[linestyle=dashed](2.1,0)(2.1,16.5)(0,16.5)
\end{pspicture*}
%%%%%%% Fig 1Fp112 - 2023-24 - END %%%%%%%
\\[\baselineskip]
%%%%%%% Fig 1Fp113 - 2023-24 - BEGIN %%%%%%%
\psset{%
xunit=1cm,%
yunit=.2cm,%
algebraic=true,%
dotstyle=*,%
dotsize=5pt 0,%
linewidth=.8pt,% default: 0.8pt
arrowsize=3pt 2,%
arrowinset=0.25%
}
\def\xmin{-3.9}
\def\xmax{4.4}
\def\ymin{-8}
\def\ymax{16}
\begin{pspicture*}(\xmin,\ymin)(\xmax,\ymax)
\small
\psaxes[%
linewidth=.8pt,%
labelFontSize=\normalsize,%
xAxis=true,%
yAxis=true,%
showorigin=false,%
Dx=1,%
Dy=5,%
ticksize=-3pt,%
xsubticks=2,%
ysubticks=5%
]{->}(0,0)(\xmin,\ymin)(\xmax,\ymax)
\uput{.2cm}[120](\xmax,0){$x$}
\uput{.2cm}[-30](0,\ymax){$y$}
\psgrid[%
gridcolor=black,% default: grey
griddots=5,%
gridlabels=0pt,%
subgriddiv=0,%
subgriddots=5,%
xunit=1,%
yunit=5%
](-4,-2)(4,4)
\psdots(-3,13)(-2,3)(-1.58,0)(-1,-3)(0,-5)(1,-3)(1.58,0)(2,3)(3,13)
\uput[180](-2,3){$(-2;3)$}
\uput[45](-1.58,0){$Z_1$}
\uput[-45](0,-5){$H(0;-5)$}
\uput[135](1.58,0){$Z_2$}
\uput[0](3,13){$(3;13)$}
\end{pspicture*}
%%%%%%% Fig 1Fp113 - 2023-24 - END %%%%%%%
\end{document}