Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [groupplots]

The groupplots library of pgfplots, which is made to facilitate placing multiple axes in a grid, with common settings.

Filter by
Sorted by
Tagged with
3 votes
1 answer
173 views

Tikz: Grouped Plot with Secondary y-axis

I have been working quite some time on a grouped error bar plot, but I've hit a wall: one of the variables (Variable 2) comes from a logistic regression, so its value/coefficient isn't directly ...
John's user avatar
  • 625
4 votes
1 answer
38 views

How to cycle colors on different plots

I have a series of five stacked plots using groupplot, with each plot featuring a single curve. I would like to color each curve differently, but I've noticed that the cycle list schemes only apply to ...
Orestes Mas's user avatar
0 votes
1 answer
30 views

Place tick scale label on top of plot contents

I came up with a pretty neat way to avoid overlap between tick scale labels and axis bounds for stacked plots by moving the tick scale labels into the axis windows, but unfortunately the lines are ...
mcmuffin6o's user avatar
1 vote
1 answer
91 views

How to align axis labels to axes in plot3 in groupplots in tikz?

The default direction of axes labels is horizontal, but I want to change it to parallel to the axes in 3D plots. For example: \documentclass{article} \usepackage{graphicx} % Required for inserting ...
Y. zeng's user avatar
  • 1,983
1 vote
1 answer
43 views

Center title from groupplot

How to go about moving the title from the groupplot to the center: Here is my code: \documentclass[11pt]{book} \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry} \...
Joe's user avatar
  • 9,080
2 votes
1 answer
51 views

Drawing between plots with groupplots pgfplots

I am trying to create a zoom effect for the plot on the left. I make a box in it and I want to draw lines from two corners of the rectangle going to the plot on the right. I thought it might be ...
Nausicaa's user avatar
2 votes
1 answer
30 views

Option 'scatter' cause color not normal in pgfplots in LaTeX?

With pgfplots package, we can plot several figures by groupplot. \documentclass{standalone} \usepackage{tikz,pgfplots} \usepgfplotslibrary{groupplots} \begin{document} \begin{tikzpicture} \...
Y. zeng's user avatar
  • 1,983
1 vote
1 answer
17 views

Label shifted in groupplots

I'm trying to plot 6 graphs using the groupplot environment. From what I understood, the y label is placed on the left of the values of the axis, but as on different figures those values are different,...
Thomas's user avatar
  • 273
0 votes
1 answer
82 views

Align y labels in different rows of a groupplot

I have the following MWE: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{groupplot}[group ...
Níckolas Alves's user avatar
2 votes
0 answers
45 views

Automatic distribution of data onto groupplots with violinplots

I am rather new to latex and pgfplots, but have to plot a rather complicated plot. I need a set of (120+) violinplots and it would be great if I could provide the data from a file (in any format, ...
LocalHorst's user avatar
0 votes
1 answer
41 views

Showing classes in scatter plot inside groupplot environment

It's possible to the following plot inside a group in groupplots? So far I was able to do this: \documentclass{article} \begin{filecontents*}{example_data.dat} total_bill tip sex 16.99 1.01 ...
ArKan's user avatar
  • 103
2 votes
1 answer
32 views

Grouped Scatter plot not rendering all the data

I have a two data files that need to be plotted in two plots which I am plotting using the groupplots package in pgfplots. The problem is the data in the hxe.dat file is not all plotted. I have tried ...
Satwik Srivastava's user avatar
0 votes
1 answer
36 views

Using groupplots for double axes plots

I am trying to plot the output of a principal component analysis. In this case, I want to group plots where I show PC1 v/s PC2, and PC1 v/s PC3. The expected output looks something like this: And the ...
Ginko-Mitten's user avatar
0 votes
1 answer
63 views

Disable references in pgfplot legends

I would like to display a common legend for a groupplot like this: \documentclass[crop]{standalone} \usepackage[svgnames]{xcolor} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \usepackage{...
hfhc2's user avatar
  • 894
0 votes
1 answer
366 views

Vertical alignment of pgfplots groupplots with uneven number of plots

I'm trying to produce a 2 colums by 2/3 rows groupplot in pgfplots. On the first column I have 2 plots, on the second I have 3 plots. I want to distribute the plot heights for the side with fewer ...
mike's user avatar
  • 343
0 votes
1 answer
242 views

align plots groupplot

I am trying to align the axis of 3 plots that are organized as the following: two on the first row and one on the second row. I would like the axis of the third plot to be aligned with the axis of the ...
Fly's user avatar
  • 315
1 vote
1 answer
66 views

PGF groupplots - loop through filenames, then split filename for use in plots

I am creating an image grid with many images by using the PGF groupplots library. I am using a for-loop with \pgfplotsforeachungrouped. Each filename is structured as follows: preamble_title_percent....
luwi's user avatar
  • 13
1 vote
1 answer
105 views

tikzscale package not working with group plots

I'm trying to scale a pgfplots that uses group plots but something is not working properly. This is the MWE: \documentclass{article} \usepackage[% total={6in,9in},% body={111.5mm,185.6mm},% head=...
aaragon's user avatar
  • 3,051
1 vote
2 answers
95 views

PGFplots/groupplots/tikz use whichever is lower: xmin or data

I'm making a lot of plots with pgfplots/groupplots/tikz from csv files, using \addplot[...] table[...]{file.csv} or \nextgroupplot[...] table[...]{file.csv} Some files have both positive and negative ...
sqek's user avatar
  • 121
2 votes
2 answers
171 views

Zerofill for integers, no zerofill for decimals

I have a correlation matrix plot that looks like this: The problem is that I would like to make '1' appear as '1.0' say, and the decimals will not have any trailing zeroes with precision set to 3. I ...
SolidMark's user avatar
  • 1,389
0 votes
1 answer
119 views

Vertically align picture with groupplot in pgfplots

I am trying to align a picture with the groupplot in a single figure. valign=t command gives a Package pgfkeys Error even though I am using \usepackage{adjustbox}. Any ideas how I can do this? Here is ...
Gagik's user avatar
  • 391
0 votes
0 answers
23 views

heatmaps in pgfplots with shared colorbar [duplicate]

I'm trying to create a groupplot of two heatmaps which share the same colorbar (the goal is that equal values in each of the two heatmaps are mapped to the same color, even if the min and max values ...
user17579347's user avatar
2 votes
1 answer
143 views

Caption shifting vertically in groupplot

I am using a groupplot to create a discontinuity in the y-axis. However, when I'm applying the axis x line=top command, the caption shifts down, as shown in the screenshot attached. Does anyone know ...
Gagik's user avatar
  • 391
0 votes
1 answer
195 views

Alignment of groupplots with external graphics

Due to computational limitations, I'm creating a heatmap with another plotting software and importing the heatmap and colorbar using the graphics option and a groupplot. Additionally, I need to plot a ...
fuj36840's user avatar
  • 550
1 vote
1 answer
43 views

pgfplots, distinct legend for each groupplot

I'm trying to have distinct legends placed below each of the groupplots. I'm using the following code: \begin{tikzpicture} \begin{groupplot}[ group style={ group name=my plots, ...
user17579347's user avatar
3 votes
1 answer
294 views

get subcaption for every plot using groupplot pgf tikz after 2020 update

all solutions I find only are from before 2020 and won't work anymore with the latest caption.sty. I'm gonna start with a MWE: \documentclass[12pt]{article} \usepackage{pgfplots} \...
Manuel's user avatar
  • 35
2 votes
0 answers
316 views

pgfplots: shared Y-axis plot with three sub plots [duplicate]

The example below has 3 (technically 6) separate plots that share a common Y-axis. I've seen many examples of shared x-axis, but I cannot figure out how to do 3 like below in pgfplots. Note I would ...
Climax's user avatar
  • 121
4 votes
1 answer
272 views

Groupplots/Pgfplots: How can I change the x-positions of the bars in a bar chart? [duplicate]

I'm trying to create a tikzpicture, composed of 2 separate diagrams. I'm using the \usepgfplotslibrary{groupplots} package for this. All is going fine, but I cannot seem to get the bars to a more ...
Dreana's user avatar
  • 177
0 votes
1 answer
63 views

Tikzscale fails for group plot with three elements, but works for two elements

For a custom figure I wanted to stack three figures on top of each other, to keep readability (multiple y axis) and comparability (all figures have the same x axis, the third figure is a combination ...
arc_lupus's user avatar
  • 1,781
1 vote
1 answer
455 views

Nested groupplot (one little groupplot inside a "main" groupplots) [duplicate]

Is it possible to have a smaller plot embedded into one of the plots of a groupplot? What I would like to achieve is like a magnified region of the lower plot, it should display two rectangles, one ...
Catarella's user avatar
  • 361
2 votes
1 answer
185 views

Groupplot with DataTable

I have two plots I would like to put in a grouppolt environment with a unique legend. Each plot is generated by a given set of data using the command \pgfplotstableread{directory}{\DataTable}. Now let'...
Catarella's user avatar
  • 361
1 vote
0 answers
92 views

Tikz's custom shape fails when groupplots library is loaded

I am using a book documentclass to write a report where I draw some circuit/block schematics using a custom tikz shape called dff that I originally found here and then slightly customised. Everything ...
DavideM's user avatar
  • 181
0 votes
1 answer
1k views

Package pgfkeys Error: I do not know the key '/pgfplots/horizontal sep' with groupplot using pgfplot

I am trying to draw multiple plots with groupplot and am getting the errors below. Package pgfkeys Error: I do not know the key '/pgfplots/horizontal sep', to which you passed '20pt', and I am going ...
Rashiq's user avatar
  • 337
2 votes
3 answers
962 views

Properly adjust pgfplot group plot to \textwidth

I am having trouble in setting the width of a pgfplot to the page width. I found this post where the issue is discussed in detail, but the provided answer does not work with external and the other ...
aaragon's user avatar
  • 3,051
1 vote
1 answer
67 views

Marginal function and total function curves using the pgfplots

I draw this diagram following a conversation though I could not understand the declare function part and so took the same values to get closer to what I needed. However, I need the following ...
Amos Machado's user avatar
0 votes
1 answer
111 views

stacking plots, same x same y [duplicate]

I've plotted 5 plots individually, but I'd like to have something like in the picture: where the y_max and the ymin is always the same and goes from 0.651 to 0.6535, but on different level like in ...
Noob_Latex's user avatar
1 vote
1 answer
125 views

On fixing the issue with ytick alignment in groupplot

I am experiencing some issues while trying to have a common y axis scale as well as ticks. I tried some solutions like every plot/.style to ensure the range of the axes over the groupplot is the same ...
crypto's user avatar
  • 757
0 votes
0 answers
84 views

pgfplots, groupplot: How to read out and set plot-lengths

I set width=33mm in a groupplot. How is this width to understand? I thought it has to be: "graph width" + label distance, but it seems to be another value. How can I read out the label ...
cis's user avatar
  • 8,266
1 vote
2 answers
169 views

Can I add a table through PGF \nextgroupplot functionality?

I have made a minimal working example which shows how far I am right now: \RequirePackage{luatex85} \documentclass[tikz]{standalone} % Default preamble \usepackage{pgfplots} \pgfplotsset{compat=newest}...
CuriosLatex's user avatar
1 vote
0 answers
42 views

Not getting smooth plot for particular dataset in pgfplot groupplot

When using groupplot to draw two plots with the common Y-axis, except for one curve the rest of them are sufficiently smooth. Even when data points are increased the steps in the plot stays. I tried ...
sabiju's user avatar
  • 11
1 vote
1 answer
327 views

Matplotlib's GridSpec in PGFPlots

I'm looking how to have the following layout in PGFPlots: This can be achieved using gridspec in matplotlib, but I can't find a way to do the same using groupplots (there doesn't seem to be any info ...
kmundnic's user avatar
  • 207
1 vote
1 answer
127 views

why my colorbar gets messed up in groupplot environment in pgfplots?

I have a single colorbar graph that looks like this: As soon as I add a similar graph using groupplot the ticks and the tick labels of the colorbar disappear: Does anyone know how to fix this? Here ...
Gagik's user avatar
  • 391
6 votes
1 answer
713 views

Why foreach failed in groupplot in pgfplots?

I know that there are some expansion problem if the \foreach command is used in pgfplots' axis environment. I have read the answer concerning this issue and I know that the loop variable should be ...
Ice0cean's user avatar
  • 1,646
0 votes
1 answer
237 views

Common legend for groupplots involving plots generated by forloop

I'm trying to adapt the solution given here (this is also relevant) where legend entries can be added via a loop. For instance if we have a collection of N curves depending on more than one parameter ...
algae's user avatar
  • 285
1 vote
1 answer
279 views

Apply complicated pgfplots setting to groupplot separately

I found a very nice answer here, that solves turning text white or black in a matrix plot depending on the value. I wish to apply this to a groupplot, but the value at which the color should change ...
fbence's user avatar
  • 1,585
0 votes
1 answer
111 views

Create 2x2 array of 3D plots with pgfplots. Running into compiling issues

I'm plotting one function of three variables as four functions of two variables, with each of the four plots having the third variable fixed at a particular value. An example is below: For anyone ...
Brayton's user avatar
  • 143
1 vote
1 answer
82 views

pgfplots: suppress labels in groupplot

In the following MWE, the Y-label overlaps with the left-hand-side plot, and therefore looks bad. I would like to suppress it (thus leaving the Y-label only for the LHS plot). How to achieve this? \...
Ilonpilaaja's user avatar
  • 1,335
2 votes
2 answers
3k views

Create a groupplot with specific total width, font family, and font size

I want to use pgfplots to plot a groupplot who's width (8 cm), font family (Arial), and font sizes (10pt for the axis labels, 8pt for the tick labels) are specific. I've tried tikzscale to get the ...
12.yakir's user avatar
  • 419
3 votes
0 answers
100 views

Wrong font scaling using when groupplot, tikzscale and fillbetween, maybe a bug (?)

Situation: I am trying to place one bigger pgfplot at the left side of a figure and four small plots (2x2) on the right half, like this: |--------|----|----| | | P2 | P3 | | plot 1 |----|-...
J. Prass's user avatar
1 vote
1 answer
255 views

Using upgreek letter bring error missing $

I am trying to create a TikZ picture with a groupplot inside (using pgfplots). I need an upright mu in the y axis label for the units. I had no problem in my previous figures which do not use ...
AlMa's user avatar
  • 560

1
2 3 4 5