TeX - LaTeX Asked by crypto on May 1, 2021
I solved an optimisation problem for three cases. I intend to plot the results as a groupplot (essentially a 3 by 1 groupplot). Since I present six sets of data in each plot, I get a graph that looks like this:
Due to the disproportionality of the datasets, we observe a near parallel line for 3 datasets, while the other lines show that the system design costs increase wrt routing costs. What I’d like to have is for the near parallel line to also show that the system design costs increase. However, this information gets suppressed. Could you please suggest some alternatives for this anomaly? Please find the code here
begin{tikzpicture}[every mark/.append style={mark size=.7pt}]
begin{axis}[
scale=0.81,
legend style={
at = {(.48,-.8)},anchor=south},%at={(0.5,-0.34)},anchor=north},
%legend columns = -1,
xmin=0,xmax=50,
ymin=0,ymax=400000,
ymode = log,
xlabel={routing costs},
ylabel={system design costs},
legend style={font=small}]
addplot
coordinates {
(0, 310006.712271894)
(10, 312781.712271894)
(20, 315556.712271894)
(30, 318331.712271894)
(40, 321106.712271894)
(50, 323881.712271894)
};addlegendentry{Centralised RAN}
addplot+
coordinates {
(0, 237.689033351856)
(10, 535.932112624024)
(20, 834.175191896192)
(30, 1132.41827116836)
(40, 1430.66135044053)
(50, 1728.90442971269)
};addlegendentry{Distributed RAN}
addplot+
coordinates {
(0, 47.5517657268742)
(10, 404.104349185922)
(20, 709.528125267976)
(30, 1014.06344997298)
(40, 1317.76112473382)
(50, 1620.73092429476) }
;addlegendentry{Fluid RAN}
addplot+ coordinates {
(0, 310007.104063121)
(10, 312782.104063121)
(20, 315557.104063121)
(30, 318332.104063121)
(40, 321107.104063121)
(50, 323882.104063121)
};addlegendentry{Centralised RAN - HIGH}
addplot+
coordinates {
(0, 93699.4500521545)
(10, 94466.4160045098)
(20, 95233.3819568651)
(30, 96000.3479092204)
(40, 96767.3138615757)
(50, 97534.279813931)
};addlegendentry{Distributed RAN - HIGH}
addplot+
coordinates {
(0, 90079.5312740768)
(10, 90995.7138828325)
(20, 91787.0309120226)
(30, 92568.9759214698)
(40, 93347.4344093317)
(50, 94123.854677605)
};addlegendentry{Fluid RAN - HIGH}
end{axis}
end{tikzpicture}
Just for fun, I created a part linear/part semilog plot.
documentclass{standalone}
usepackage{pgfplots}
usetikzlibrary{calc}
begin{document}
begin{tikzpicture}[every mark/.append style={mark size=.7pt}]
begin{axis}[name=lower,
scale=0.81,
height=3cm, width=6cm, scale only axis,
xmin=0,xmax=50,
ymin=0,ymax=50000,
ymode = log,
xlabel={routing costs},
ylabel={hspace*{2.5cm}system design costs},
ylabel shift=2cm,
legend to name=part1,
legend style={font=small}]
addplot+
coordinates {
(0, 47.5517657268742)
(10, 404.104349185922)
(20, 709.528125267976)
(30, 1014.06344997298)
(40, 1317.76112473382)
(50, 1620.73092429476) }
;addlegendentry{Fluid RAN}
addplot+
coordinates {
(0, 237.689033351856)
(10, 535.932112624024)
(20, 834.175191896192)
(30, 1132.41827116836)
(40, 1430.66135044053)
(50, 1728.90442971269)
};addlegendentry{Distributed RAN}
end{axis}
begin{axis}[shift=(lower.north west),
scale=0.81,
height=3cm, width=6cm, scale only axis,
xticklabels={}, cycle list shift=2,
xmin=0,xmax=50,
ymin=50000,ymax=400000,
legend to name=part2,
legend style={font=small}]
addplot
coordinates {
(0, 310006.712271894)
(10, 312781.712271894)
(20, 315556.712271894)
(30, 318331.712271894)
(40, 321106.712271894)
(50, 323881.712271894)
};addlegendentry{Centralised RAN}
addplot+ coordinates {
(0, 310007.104063121)
(10, 312782.104063121)
(20, 315557.104063121)
(30, 318332.104063121)
(40, 321107.104063121)
(50, 323882.104063121)
};addlegendentry{Centralised RAN - HIGH}
addplot+
coordinates {
(0, 93699.4500521545)
(10, 94466.4160045098)
(20, 95233.3819568651)
(30, 96000.3479092204)
(40, 96767.3138615757)
(50, 97534.279813931)
};addlegendentry{Distributed RAN - HIGH}
addplot+
coordinates {
(0, 90079.5312740768)
(10, 90995.7138828325)
(20, 91787.0309120226)
(30, 92568.9759214698)
(40, 93347.4344093317)
(50, 94123.854677605)
};addlegendentry{Fluid RAN - HIGH}
end{axis}
node[below=1cm,align=center] at (lower.south) {pgfplotslegendfromname{part1}
pgfplotslegendfromname{part2}};
end{tikzpicture}
end{document}
Answered by John Kormylo on May 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP