Questions tagged [matlab2tikz]

A tag for TikZ/pgfplots code generated by matlab2tikz. Use this tag *in addition* to pgfplots to stress that your pgfplots code has been generated by matlab2tikz. matlab2tikz as such is out-of-scope of this platform; it is unrelated to TeX.

Filter by
Sorted by
Tagged with
2
votes
1answer
1k views

Adding a textbox to a pgfplot

From Matlab I have a set of data from which i create a graph. The plot with Latex works perfectly fine. To this plot I am adding a coloured square in the background, which is also working. Here a ...
3
votes
1answer
950 views

matlab2tikz, label on right side of colorbar

How to move the label right of the colorbar? Now it is in the plot itself. This is the matlab-code.... clear all close all clc figure surf(peaks(2)) cb = colorbar cb.Label.String = 'Label' ...
2
votes
1answer
276 views

Two tikz png's from matlab to tex in same figure gives grouping error 255

I've tried to create a figure in LaTeX for my MSc thesis using two separate tikz figures. The tikz figures were exported from MatLAB using the following command: matlab2tikz('tikz/figure.tikz', '...
3
votes
2answers
911 views

matlab2tikz spectrogram is too big

I have produced the following spectrogram in MATLAB and I am trying to import it into a LaTeX document after using matlab2tikz. I am fully aware of the issues with maximum memory etc for typesetting, ...
2
votes
1answer
919 views

Matlab2Tikz colorbar / colormap issues

I've got some issues using the matlab2tikz script by Nico Schlömer. In Matlab I created a 3d plot including a bunch of patches. Some scalar values are highlighted using the jet colormap (see the ...
1
vote
1answer
472 views

Tikz crashes with vertical lines in plot - Error: Dimension too large [closed]

I had to shorten the code because it would not fit here. I am trying to make 4 subplots in Tikz. I used Matlab and Matlab2Tikz to get the figure in Latex. I cannot compile and keep getting an error ...
1
vote
1answer
205 views

Automatically align 104 subplot in pgfplots

Using Matlab2tikz I generated a file containing 104 subplots aligned in a very specific manner. I then inserted \pgfplotsset{yticklabel style={text width=2em,align=right},}, compiled and obtained the ...
3
votes
1answer
304 views

A _standard_ way to use matlab2tikz output from a subfolder

In my tex project I use an ./images/xxx/ directory to save stuff generated by matlab2tikz. Sometimes matlab2tikz generates png's. When I try to "\include" the tikz file it fails to import those for an ...
1
vote
1answer
121 views

matlab2tikz one label entry missing

when I use the command matlab2tikz, I have one label missing. I have a specific procedure to make this figure because I want only some marker in Matlab. To do that for one plot I make this following ...
0
votes
1answer
294 views

Matlab2tikz breaks major tick weight

matlab2tikz breaks my tick weights on both x-and-y axis. The figure in MATLAB looks like following. After running it through matlab2tikz with all possible known options of ExtraAxisOptions, I manage ...
2
votes
0answers
326 views

Blurred colormap using matlab2tikz to export Matlab imagesc picture [duplicate]

I'm using matlab2tikz to export imagesc figures into TikZ/pgfplots code. This process gives me a TikZ file and a rasterized png version of the image with colours matching the colourbar at the time of ...
2
votes
1answer
2k views

Tikz, text outside plot

I just included matlab figures using matlab2tikz. I have annotations in my figures. These annotations are outside the plot area to prevent overlap with the data. But now I also want the annotations ...
1
vote
0answers
194 views

tikz \addlegendentry leading to error for certain plots [closed]

Using Emacs/Auctex under Ubuntu 14.04 (TexLive 2012) I get the following error ERROR: Undefined control sequence. --- TeX said --- <argument> \pgfplots@current@point@x,\pgfplots@current@point@y,...
2
votes
1answer
525 views

how can I explain a MATLAB code in my document like picture?

I have a matlab code and I want explain part of them like picture. or any other idea can do better. \documentclass{article} \usepackage{listings} \usepackage{color} %red, green, blue, yellow, cyan, ...
1
vote
2answers
381 views

Sharpening blurred surface plot in pgfplots/tikz

I have used matlab2tikz to plot an image as follows: As you can see, the red and blue zones on the image are highly blurred. I would like to know if there is any way that they can be sharpened. My ...
1
vote
1answer
464 views

How to control the ticklabel size in TikZ graphics?

Is there any method to control the size of ticklabels in LaTeX when using pgfplots? It seems that the yticks are written in a wrong way LaTeX snippet: \begin{tikzpicture} \begin{axis}[% width=\...
0
votes
1answer
162 views

Reduce size of sub images in tikz/pgfplots

I had created an tikz image using matlab2tikz, as seen below: I would like to reduce the size of the individual spheres while keeping the dimensions of the overall image constant, essentially ...
2
votes
1answer
521 views

Remove 10-base x tick labels from matlab2tikz plot

I am trying to extract some plots from Matlab for XeLaTex using Matlab2Tikz. All goes well, except the plot with the loglog scale (I included a figure, see below). The left bottom plot shows a loglog ...
4
votes
3answers
3k views

Drawing spherical harmonic density plots on the surface of a sphere in tikz/pgfplots

I would like to create spherical harmonic plots in tikz/pgfplots similar to the one below, except without the axes and with labels above every image: It would be good if I could specify different ...
2
votes
1answer
2k views

pgfplots 3D bar chart - wrong plotting order

I am using bar3 to plot 3d diagrams in Matlab but it seems that in LaTeX the plotting order is wrong ? Is there any way to have the right order? This is a small example of the generated 2.tikz file ...
2
votes
0answers
509 views

what is the best way to export 3D plots in Latex

I'm using bar3 plots from Matlab but the problem is the plots in Latex are not the same as in Matlab
1
vote
0answers
151 views

Problem in inserting a logarithmic plot by using the matlab2tikz function

I am using the matlab2tikz function for obtaining a .pgf file. The problem is that when I use this function for a “semilogy” plot of Matlab then in LaTeX it doesn't show any plot. If anyone has an ...
2
votes
2answers
617 views

Subplots do not align properly when using matlab2tikz

I am experiencing some problems with matlab2tikz. I create a subplot in matlab. however, when I convert it to .tex code using matlab2tikz, the subplots are not properly aligned. Code: % This file ...
0
votes
1answer
810 views

How to remove 10^5 in x-Axis of time series plot generated with matlab2tikz

I generated the following simple plot in Matlab: Date=720000:730000 y=Date plot(Date,y) y=log(Date) plot(Date,y) datetick('x','yyyy') matlab2tikz('test.tex') which converts the date serial numbers ...
1
vote
0answers
124 views

Axis border missing once using Matlab2tikz [closed]

when I use Matlab2tikz to generate tikz file for my Matlab figure, it happens sometimes that some axis borders will disappear in the resulting PDF after compilation as shown in the following figure: ...
2
votes
1answer
587 views

matlab2tikz scales width variable by factor 0.95092

I use global default variables \figwidth for figure width and \figheight for height in my document. These are defined by the following code in my document header: Latex \newcommand{\figwidth}{0.8\...
1
vote
1answer
600 views

Exporting stacked bars using matlab2tikz in MATLAB working strangely

I have created a stacked bars in matlab as shown in the figure. In matlab figure window it looks like this: I use the following command to get this plot. plotBarStackGroups(rand(5,3,3), [1:3]) It ...
1
vote
0answers
658 views

moving axis-labels in a matlab2tikz picture [closed]

I'm working with matlab2tikz to make pictures for a paper I have to write. I need a pretty small picture because I'm putting two of them together, each of the two consisting of 2 subplots in Matlab. ...
5
votes
1answer
560 views

TikZ plots get recompiled every time when using tikzscale

For my thesis I have a lot of TikZ plots exported from Matlab using the matlab2tikz library. I want to use the tikzscale package together with externalization of the plots to save compiling time. ...
2
votes
2answers
1k views

Use Matlab 2014b figures (via Inkscape) in pdfTeX

I know there are many threads related to this topic, but I still could not find a satisfying solution. Summary Matlab 2014b figures -> export as .eps or .svg -> load into Inkscape (problem is in here:...
1
vote
0answers
89 views

Misaligned text strings in pgfplots with view option set [closed]

Please see this post for more background. The problem is that tick mark labels explicitly specified by code of the form: text(x(k),y(k),labs{k},'horizontalalignment',horizk,... 'verticalalignment',...
1
vote
1answer
2k views

Make visible node text outside of pgfplot axes range

I'm using matlab2tikz in order to generate pgfplots .tex code to create a figure with pdflatex. The matlab function I'm using to create the figure creates each of it's tickmark labels explicitly, so ...
6
votes
0answers
10k views

TeX capacity exceeded, sorry [main memory size=5000000] with matlab2tikz and reduce_plot

Yet another Tex Capacity exceeded error. I am generating a matlab scatter plot which without modification resulted in a 64.5 MB printed eps file. Using that plot directly in matlab2tikz resulted in a ...
1
vote
0answers
410 views

Lines plotted in front of others, though they should behind in a 3d plot

After converting a figure to TeX using matlab2tikz, I figured there's a little problem. The figure consists of many lines, but there are two different sets of lines a cloud set, forming a stream and ...
1
vote
2answers
295 views

Memory error on writeLaTeX - Externalize or other solution to build dense plots docs

TeX capacity exceeded, sorry [buffer size=20000 There are questions about memory exhaustion when building docs with tikz plots in it. I could not find a solution, though. Downsampling is not an ...
1
vote
1answer
836 views

Get pre-defined colors into table in TikZ

I'm doing some plots in TikZ via matlab2tikz, which gave me the following output: \documentclass[a4paper]{article} \usepackage[dvipsnames]{xcolor} \usepackage{pgfplots} \usepackage{tikz} \begin{...
2
votes
2answers
1k views

Root locus plots using LaTeX

On my homework, I need to create a root locus plot. Wondering if anyone out there has good suggestions for a package that is able to create root locus plots, or a general plotting package that is ...
5
votes
2answers
3k views

Add legend to pgf plot results in \end{axis} error

I exported a Matlab figure to tikz, using matlab2tikz. It is a simple plot of some lines and I need to label them. matlab2tikz did not add the legend entries automatically for the first time, so I ...
2
votes
1answer
451 views

“Dimension too large” while working with serial date numbers

I export plots using matlab2tikz and pgfplots from MATLAB to TeX. Most of my plots contain "serial date numbers", which are the days since January 0, 0000. As you can guess, the numbers get quite high,...
1
vote
0answers
72 views

matlab2tikz/pgfplots: Tick-labels in axis cannot be overwritten [duplicate]

I want to export plots from MATLAB to tikz and use matlab2tikz to do so. Most of the data I have has dates on its x-axis. In MATLAB I use serial date numbers to store the time. I override the ...
1
vote
1answer
1k views

pgfplots move colorbar scaled label to top right

Hi I was wondering how to shift the scaled label on the colorbar to the top right? The has been autogenerated by matlab2tikz, but I would like to move the .10^-3 to the top right like it was ...
2
votes
1answer
925 views

axis alignment for 3D graph using matlab2tikz

I am trying to include multiple 3D figures (created in matlab) into a latex file. The original 3D figures in matlab look like this: In the .m file that creates these figures, I use ylabel('...
5
votes
1answer
6k views

matlab2tikz font size

I Latex, how can I change/reduce the font size on a Matlab figure created by using matlab2tikz? I would like to reduce the font size on the axis numbers, labels, title, legend, etc. It does not ...
9
votes
1answer
2k views

How can I import matrix data (2d function) from matlab into pgfplots?

This question arised in Spectrum colormap for multiple curves, but since it is of general interest, I add a separate question and my answer here. Suppose you have a matlab figure which needs to be ...
5
votes
1answer
2k views

Spectrum colormap for multiple curves

I have been using matlab2tikz to generate a lot of my plots, but I am finding it struggling at this particular job so would like to inquire about how to do it properly in pgfplots / tikz. Essentially ...
3
votes
3answers
2k views

Matlab2tikz, alignment of subplot ylabel (large distance from plot)

Matlab2tikz came to my attention in the past month and have been using the simple tutorial from HowToTeX. It has worked great so far only one issue remains, I am unable to anchor the ylabel to the ...
4
votes
0answers
715 views

pgfplots error using matlab2tikz [closed]

I am trying to plot a matlab figure in latex file. so i use this matlab2tikz function. It works really well, until I try to add some customised text on the figure before converting it to tikz file, ...
2
votes
2answers
696 views

Matlab2Tikz FaceColor Surfplot

I would like to export a surf plot, whose face color is for example green, out of MATLAB R2014a to latex with the aid of matlab2tikz. Unfortunately when i run pdflatex the face color now ranges from ...
2
votes
2answers
973 views

doing 3x3 subplots with the colorbar located northside

I wanted to have my nine (2d) matlab plots shown as 3x3 subplots in latex with the colorbar located northside. I have no idea how to do this especially that I have the colorbar saved separately from ...
4
votes
1answer
2k views

Package pgfkeys Error: I do not know the key '/tikz/y error plus index'

I am having trouble compiling the attached mwe. I receive the following message: "Package pgfkeys Error: I do not know the key '/tikz/y error plus index' and I am going to ignore it. Perhaps you ...