Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
1
vote
0answers
448 views

“Dimension too large” error with pgfplot generated with matlab2tikz [closed]

I would like to insert a tikz plot generated with matlab2tikz in my code. This is the code to generate the matlab image X1=[7.4632 8.0349 8.5251 8.8176 9.2251 9.5559 9.9214 10....
2
votes
0answers
3k views

externalize pfgplots fails with shell escape enabled (TexLive-2013 Mac)

I have the following Problem: I am using matlab2tikz to get my Matlab plots into latex. I have very large time series, that i already cut down using resampling. Nevertheless my I need a lot more time ...
3
votes
1answer
3k views

Problem with xticks when importing Matlab figures using matlab2tikz

When importing the following figure using the Matlab2Tikz, I obtain the following output , with the xticks strangely exported . Does any one have an idea how I can prevent this? Maybe by passing an ...
1
vote
1answer
666 views

Matlab2Tikz Error with userdefined matlab colors

I try to include from matlab exported (matlab2tikz) tikz files into latex, but get error messages if i don't use matlab default colors. I don't get the problem?! Thanks you guys in advance Error: !...
2
votes
1answer
447 views

How to programmatically coax pgfplots to recognize nan within surface as matlab does

I came across this post after wondering why nan's did not appear to be handled by pgfplots as they are by matlab when working with the matlab pcolor function. My typical workflow in this context is: ...
4
votes
1answer
678 views

Axis background shading overriding legend

This code in MATLAB: hold on h(1) = area([0 2.5], [125 125]); h(2) = area([2.5 5], [125 125]); set(h(1),'FaceColor',[1.0 0.8 0.6],'EdgeColor',[1.0 0.8 0.6]); set(h(2),'FaceColor',[1.0 0.8 0.4],'...
1
vote
0answers
605 views

Problem with table in matlab2tikz on Ubuntu [closed]

I have been using matlab2tikz last year on mac and it worked perfectly fine. Now I'm using it on Ubuntu and encounter some problems. FYI in installed texlive-full which does include pgf 2.1 and in my ...
3
votes
1answer
2k views

Using MATLAB area() to shade graph error in matlab2tikz

I generate a graph in MATLAB and want to shade regions. So I use the area() command and set it to display in the right order. MATLAB code for the graph: hold on x = 0:1:5; y = sin(x); plot(x,y); h(...
1
vote
3answers
10k views

tikz+matlab2tikz

I'm quite new at latex, but finding it awesome. Yet when it comes to figures things do get a bit tiresome. I'm currently linking a big amount of matlab plots with latex articles with matlab2tikz. ...
2
votes
1answer
280 views

Grouping plots without groupplots

Running this MWE: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{figure} \centering \begin{tikzpicture} \begin{axis}[% width=2in, height=2in, scale only axis, xmin=0, xmax=7, ...
2
votes
1answer
523 views

LuaLaTeX returns illegal unit of measure for .tikz

I have a large graph generated from matlab2tikz (~1.3mb) that I am trying to compile. Latex gives me out of memory errors so I am trying LuaLaTeX. The problem is LuaLaTeX gives me an error: Illegal ...
2
votes
0answers
173 views

matlab2tikz does not capture legend title? [duplicate]

I generate a plot in MATLAB using the code below (MWE): x = [1:100]; y = x.^0.5; [hLine1]=semilogx(x,y); hleg1 = legend(sprintf('%.4f',0.4334)); set(get(hleg1,'title'),'string','test'); set(hleg1, '...
4
votes
2answers
2k views

define manually the position of a pgfplots plot inside the TikZ picture

I just started using matlab2tikz for the graphics in my thesis and got stuck with a probably simple problem: I have a plot of a function and an inset (zoom-in) on it. Both the main plot and the inset ...
3
votes
2answers
2k views

pgfplots surf plot: don't draw 'NaN'

I generated a checkerboard style suface plot using matlab2tikz. The data contains nan (not a number) values. I want the squares of nan values to be white (as in matlab). When I compile, I get the ...
1
vote
1answer
3k views

Dimension too large from matlab2tikz, and aligning graph axis

I have a MATLAB generated plot that looks as follows: Generated with this code: plot(fitGoodnessNRMSE,'b','LineWidth',1); axis([1 511 0.5 1]); ylabel('Normalized RMS error'); xlabel('q (um^-1)'); I ...
8
votes
1answer
1k views

Reverse graphics in pgfplots

Issue and Question I encountered that my graphics are all upside down. Now I have to mirror them in pgfplots. How can I perform this step? It is no solution using the option [y dir=reverse] which ...
0
votes
1answer
2k views

label font size in matlab->matlab2tikz

Does anyone knoy how can we increase the labels fontsize when we use the matlab2tikz (see this link) function from the mathworks file exchange? I always have to access the *.tikz generated file and ...
0
votes
1answer
791 views

Package collision matlab2tikz and legend in polaraxis. pgfplotset and multiple size definition problem

How can plots, created by matlab2tikz and common tikzpicture-polaraxis be correctly used within the same document? The example is of the structure packages, matlab2tikz-pic1, matlab2tikz-pic2 and ...
4
votes
1answer
872 views

Get this error when I run my pgfplots

I got a problem with my pgfcodes. I get this error: ! Package pgfplots Error: Sorry, pgfplots expects stacked plots to have exactly the same number of coordinates. Unfortunately, I encountered at ...
4
votes
1answer
879 views

\vref and input command

You've saved my life in some occasions, I am writing my master thesis and as I am working with MATLAB, I found a very useful MATLAB function which "translate" MATLAB images to TeX tikzpicture. I ...
1
vote
2answers
1k views

3D as 2D plots using Matlab data

I am trying to plot 3d data as 2d (please refer to the attached figure). Is that possible at all in Tex (or Matlab)?(Usually, this is done a s a legend, however, when no colors are allowed, I have to ...
0
votes
1answer
442 views

TikZ legend changes the line legend into a rectangle legend

I am using TikZ to insert MATLAB figures but the problem is that I have two legends one is a line and the other is a rectangle. When I insert it, both look like a rectangle. How should I correct it ?
8
votes
2answers
1k views

Setting the unit vector ratio gives a '! Dimension too large' error

I have a Delaunay-triangulated surface generated in MATLAB, which I would prefer to render in tikz. I use Nico Schlömer's matlab2tikz script to generate the standalone tex file. The MATLAB result ...
48
votes
8answers
4k views

matlab2tikz logo

As the author of the free and open-source package matlab2tikz, I was going to create a nice-looking logo for the software that is easily recognized on MATLAB's file exchange and representative of ...
1
vote
0answers
728 views

matlab2tikz/pgfplots adding colorbar afterwards

I am currently using both matlab2tikz and pgfplots with external graphics since I am not completely convinced by either yet. Is it possible to add a colorbar with any of the two afterwards (meaning ...
4
votes
0answers
448 views

image too bright when exporting grayscale matlab images with matlab2tikz [closed]

I am using matlab2tikz to export my MATLAB plots to tikz. This works pretty well as long as I am using the colormap jet inside MATLAB. Unfortunately, as soon as I am using grayscale, the resulting ...
4
votes
2answers
5k views

Set the axis range according to the data range, that is, no scales for axis

I use the matlab2tikz package to creat surface in LaTex editor, but it display ugly unlike the Fig. created in the Matlab. Can anyone help me out? Is there a way of adjusting the x,y and z axis ranges ...
6
votes
3answers
3k views

matlab2tikz imagesc TikZ/pgfplots equivalent

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 ...
4
votes
1answer
2k views

Dimension too large after exporting box plot with matlab2tikz

When exporting a box plot with matlab2tikz I get no errors, but when running pdflatex I get a "dimension too large" error. This only happens with box plots. Still the box plot shows up as it should, ...
4
votes
1answer
13k views

Replacing axis labels with text in Tikz

I am plotting 11 points in a scatter plot in Matlab and replacing the x-axis labels 1 - 11 with strings using: figure; grid on; hold on; box on; scatter(2:10,100*d1(1,:),'rs','filled'); scatter(2:10,...
3
votes
1answer
3k views

Problems with axis label and colorbar for pgfplots

I used matlab2tikz to convert a figure from matlab to tikz. When I run this code, I get this addition $.10^-2$ in both X and Y axis. (see figure below ). In addition ytick of the colorbar is also not ...
6
votes
1answer
3k views

New line in pgfplots/tikz not displaying in TeX

I have a multiple-line legend entry to preserve the width of my figure. I can use \newline in Matlab and the legend entry is split between two lines. When I produce a .tikz of the figure however, I ...
5
votes
2answers
2k views

Argument to \input or \include statement?

I produce a lot of plots in Matlab which I export to TikZ with matlab2tikz. In matlab2tikz I can specify the plot width and height, for instance. This works out quite nicely, but as I write my ...
0
votes
1answer
256 views

Group labels in pgfplots or finding cm fonts for windows

I'd like to put a second xlabel on a grouped bar graph using TiKz but can't seem to work it out. So I have found this cm superfonts package: http://ctan.org/pkg/cm-super. Or I can download cm fonts ...
7
votes
1answer
1k views

Scale markers in external Tikz file

I use external .tikz files to include graphics in my LaTeX document. These .tikz files are generated by matlab2tikz. The scatter plots that come out though have very small markers. I want to scale ...
2
votes
0answers
968 views

Undefined control sequence. \pgfplots@already@computed@legend@node [closed]

I got following error in my computer only. Undefined control sequence. \pgfplots@already@computed@legend@node ..._{\text {des}}$};\\\pgfplots@show@.....
4
votes
1answer
303 views

Why does pasting the contents of a tikz file into my main file compile properly but not when using \input

If I place the contents of my tikz picture in my main.tex file it works like a charm using \usepgfplotslibrary{external} \tikzexternalize and subsequently: pdflatex --enable-shell \...
1
vote
1answer
5k views

tikz pgfplots forget plot

I'm having problems finding how to use forget plot in tikz. I need only 2 legendentries like this: but get a massive long list of every object in the graph. This post addresses the problem but seems ...
5
votes
0answers
2k views

Matlab2tikz adds extra legend entries [closed]

The legend from a boxplot figure is not being created properly. I get this: Instead of thiS: But really only need 2 legend entries. Any Ideas why all the objects in this plot are being given ...
9
votes
1answer
1k views

Error when creating a surf plot with matlab2tikz

I'm using matlab2tikz to generate the tikz code for my figures. When compiling the document with the figure code as below, i get an error: Package pgfplots Error: No such element: \...