Graphics, Figures & TablesTweaking some parts of a chart

Information and discussion about graphics, figures & tables in LaTeX documents.
dasag
Posts: 30
Joined: Wed Dec 10, 2014 3:43 pm

Tweaking some parts of a chart

Post by dasag »

How can I to make very cleary my page?

Code: Select all

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\definecolor{mycolor1}{rgb}{1,0,1}
\definecolor{mycolor2}{rgb}{0,0.498039215803146,0}
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 4\\
4 6\\
8 8.8\\
12 2.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 4\\
4 6\\
8 8.8\\
12 2.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%


\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 5\\
4 5\\
8 9.8\\
12 6.8\\
24 6.162\\};
\end{axis}
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={black},
ytick style={yellow},
yticklabel style={red},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=black,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 5\\
4 5\\
8 9.8\\
12 6.8\\
24 6.162\\};
\addplot [
color=black,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 2\\
4 3\\
8 4.8\\
12 7.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

dasag
Posts: 30
Joined: Wed Dec 10, 2014 3:43 pm

Tweaking some parts of a chart

Post by dasag »

I dont know where I must to write this code

Code: Select all

\begin{axis}[width=0.3\textwidth,
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Tweaking some parts of a chart

Post by Stefan Kottwitz »

dasag wrote:How can I to make very cleary my page?
What does it mean? Completely blank? Or without page number? The latter can be done by

Code: Select all

\thispagestyle{empty}
or document wide by

Code: Select all

\pagestyle{empty}
Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Tweaking some parts of a chart

Post by Stefan Kottwitz »

dasag wrote:I dont know where I must to write this code

Code: Select all

\begin{axis}[width=0.3\textwidth,
axis is the environment for pgfplots. They are always within a TikZ environment. So, commonly, \begin{axis} comes right after \begin{tikzpicture}.

Have a look at PGFPlots.net for a lot of examples of any kind.

Stefan
LaTeX.org admin
dasag
Posts: 30
Joined: Wed Dec 10, 2014 3:43 pm

Tweaking some parts of a chart

Post by dasag »

Dont help this code \thispagestyle{empty}

Code: Select all

\documentclass{article}
\usepackage{pgfplots}
\thispagestyle{empty}
\pgfplotsset{compat=newest}
\begin{document}
\definecolor{mycolor1}{rgb}{1,0,1}
\definecolor{mycolor2}{rgb}{0,0.498039215803146,0}
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 4\\
4 6\\
8 8.8\\
12 2.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 4\\
4 6\\
8 8.8\\
12 2.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%


\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 5\\
4 5\\
8 9.8\\
12 6.8\\
24 6.162\\};
\end{axis}
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={black},
ytick style={yellow},
yticklabel style={red},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=black,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 5\\
4 5\\
8 9.8\\
12 6.8\\
24 6.162\\};
\addplot [
color=black,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 2\\
4 3\\
8 4.8\\
12 7.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%
\end{document}
I want all 4 graph show in one page. When youopen my code you can see
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Tweaking some parts of a chart

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
dasag
Posts: 30
Joined: Wed Dec 10, 2014 3:43 pm

Tweaking some parts of a chart

Post by dasag »

dont work your code-empty

Code: Select all

\documentclass{article}
\usepackage{pgfplots}
\thispagestyle{empty}
\pgfplotsset{compat=newest}
\begin{document}
\definecolor{mycolor1}{rgb}{1,0,1}
\definecolor{mycolor2}{rgb}{0,0.498039215803146,0}
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 4\\
4 6\\
8 8.8\\
12 2.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 4\\
4 6\\
8 8.8\\
12 2.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%


\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={blue},
ytick style={blue},
yticklabel style={blue},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=blue,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 5\\
4 5\\
8 9.8\\
12 6.8\\
24 6.162\\};
\end{axis}
\end{tikzpicture}%
\begin{tikzpicture}
\begin{axis}[
color=black,
scale only axis,
xmin=1,
xmax=24,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},
xtick={0,4,8,12,24},   %%%<------------- here
xlabel={$y$},
ymin=1,
ymax=10,
ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},
y axis line style={black},
ytick style={yellow},
yticklabel style={red},
axis x line*=bottom,
axis y line*=left,    
tick align = outside,]
\addplot [
color=black,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 5\\
4 5\\
8 9.8\\
12 6.8\\
24 6.162\\};
\addplot [
color=black,
solid,
line width=0.5pt,
mark size=2.5pt,
mark size=2.5pt,
mark=square*,
mark options={solid,,rotate=180,fill=blue}]
table[row sep=crcr]{
1 2\\
4 3\\
8 4.8\\
12 7.8\\
24 8.162\\};
\end{axis}
\end{tikzpicture}%
\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Tweaking some parts of a chart

Post by Stefan Kottwitz »

dasag wrote: I want all 4 graph show in one page. When youopen my code you can see
They are too big. You can specify a width. Add, for example,

Code: Select all

\pgfplotsset{width=5cm}
after pgfplots has been loaded, in the preamble.

Stefan
LaTeX.org admin
dasag
Posts: 30
Joined: Wed Dec 10, 2014 3:43 pm

Re: Tweaking some parts of a chart

Post by dasag »

Superrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

Thank you very much ;) ;) ;) ;) ;) ;) ;) ;) ;) ;) ;) 8-) 8-) 8-) 8-)
Post Reply