The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0answers
49 views

Why does a nan-only plot lead to an error when requesting a legend

Let me first admit that this may be a really dumb question. I am using matlab2tikz to export some figures from matlab. As I need some legend entries to be unrelated to my actual plots, I use nan-...
0
votes
0answers
29 views

Python equivalent of matlabfrag

I have been a regular user of matlab for plotting. I use matlabfrag to save as eps for the plot along with a tex file containing labels. This can be rendered with Latex fonts after including them in ...
5
votes
1answer
564 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. ...
0
votes
0answers
49 views

Color interpolation (shader) does not work when using Matlab2tikz

I am trying to improve the quality of my plots in MATLAB and so I used Matlab2tikz to transform the MATLAB plots in pgfplots. I want to perform a color interpolation but this does not work and after ...
0
votes
0answers
57 views

Matlab2tikz // Error divsion by 0.0

I created a minimal working example in Matlab: [x,y] = meshgrid(-2:0.1:2,-2:0.1:2); fx = x.*y; fy = x.*y; figure quiver(x,y,fx,fy) matlab2tikz('plot.tex'); This works great and creates the plot....
2
votes
0answers
41 views

second half of matlab area plot is missing after converting by matlab2tikz

I did an easy phase diagram using the area function in Matlab. I converted it into tikz by using the matlab2tikz function which generates following code: \documentclass[tikz]{standalone} \usepackage[...
0
votes
1answer
224 views

Handling nan's with pgplots/matlab2tikz

I am currently developing some simulations using a nonlinear model w/ feedback in MATLAB where there exist some trajectories that are unstable. I want to export this using matlab2tikz so I can have ...
4
votes
1answer
198 views

Change font size in matlab2tikz

I am using matlab2tikz to export my Matlab figures in order to be able include them in my LaTeX document. I think the fonts of the tick labels, axis labels, titles and legends are too big. How can I ...
1
vote
0answers
68 views

Unable to display tikz plot using externalize and matlab2tikz

I have a tikz picture I have converted from Matlab using matlab2tikz. I am attempting to use the tikz externalize feature as I have many plots to compile in a larger document. When I compile the ...
1
vote
1answer
57 views

Append style only to nodes in the graphic area of an axis environment

I am currently using matlab2tikz to export graphical data to latex. Some of the plots I use contain both pgfplots objects such as \addplot and tikz objects such as \node or \draw in potentially ...
2
votes
1answer
59 views

Issue with PGFPLOTS colormap

I'm observing some odd behavior on my colormaps. Here is a minimum working code example: \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{ colormap={parula}{[1pt] ...
2
votes
1answer
47 views

matlab2tikz not compiling

In the code generated by matlab2tikz, I am having a problem compiling the code. The error that I get is: ! Missing } inserted. <inserted text> } I am not seeing in the code ...
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
0answers
262 views

Includegraphics error - “PDF contains invalid UTF-8 characters”? [closed]

I have a PDF figure (a PGFplot created by matlab2tikz). However, when I include it in my LaTeX document (using \includegraphics, I get loads of errors complaining String contains an invalid utf-8 ...
0
votes
1answer
220 views

matlab2tikz font size change

I am working with an elseiver article, I export a matlab graphic using matlab2tikz, my problem is that i can not change the font size in the .tex file. Actually, i have the following output I would ...
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 ...
1
vote
1answer
97 views

Multi-particle rendering using Matlab2tikz

This is an extension to the question here. I tried the same logic for a multiparticle environment. I have around 100 particles in a cubic box. But I export only 10 particles for simplicity. The ...
2
votes
2answers
108 views

Draw part of a pgfplots table based on the amount of points

Here is my problem I have tabular data exported from MATLAB using matlab2tikz. My initial plot is sort of a ribbon plot. Therefore, when exporting it to tikz, the tabular data for each ribbon is of ...
1
vote
1answer
100 views

Difference in rendering from Matlab2tikz

I have a 3D object produced from Matlab which is like this: I would like use a vector graphics of the above in my document. However due to the file size, I prefer to save as tikz picture. I used ...
0
votes
2answers
110 views

matlab2tikz with stepplot(): asymptote ruining scale

So, I use the following MATLAB code: sys1 = rss(3); sys2 = rss(3); h = stepplot(sys1,sys2); As an example of what I'm trying to do. This gives me the following plot of my step response (great): I ...
1
vote
1answer
124 views

Tikz error with simple Lineplot with legend

I try to plot a line from the file "aLinePlot.tex" which is automatically generated via matlab2tikz: % This file was created by matlab2tikz. % %The latest updates can be retrieved from % http://www....
2
votes
1answer
504 views

Position y and x label at the middle of 2x2 subplot

I got a figure with subplots from Matlab using matlab2tikz function but I don't like the fact that all figures have their own y and labels. I'd like to position a label at the middle of the big figure ...
2
votes
0answers
398 views

pgfplots with matlab2tikz: Change Number Format of Axis (Exponent of Scientific Notation) [duplicate]

have produced a plot in matlab converted it to tikzpicture via matlab2tex. in matlab it looks fine but in tikzpicture the x-axis looks ugly (see picture) i want 0-10x10^9 and not 0-1x10^10 how can i ...
0
votes
1answer
218 views

Different height of tikz subfigures despite same axis width/height

Why do the subfigures in this document have different heights despite having the same axis width/height? How can I fix this? \documentclass[10pt,a4paper]{article} \usepackage{float,subcaption} \...
1
vote
1answer
400 views

after executing matlab2tikz legend is incomplete

Hello i'm a bit desperate. As nobody seemed to care about my last post i tried a lot on my problem but i still couldn't find the solution. I want to use matlab2tikz to include my matlab figures into ...
1
vote
1answer
190 views

matlab2tikz ignoring error bars

I'm using matlab2tikz for a plot with horizontal error bars, but the pgfplots file generated doesn't include the error bars, while everything else is fine. I'm plotting my data in matlab like this: y ...
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 ...
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. ...
4
votes
1answer
878 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 ...
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, ...
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 ...
2
votes
1answer
943 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 ...
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
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 ...
0
votes
1answer
799 views

How to manually specify the ticks for the colorbar with matlab2tikz

I have a matlab script, which creates some compound plot. When I export the figure using matlab2tikz, the manual ticks of the colorbar are lost. Even if I try extraAxisOptions to do it manually, ...
1
vote
0answers
153 views

I am not able to plot .tikz figure [closed]

\documentclass[10pt,a4paper]{article} \usepackage{amsmath} \usepackage{graphicx} %line width=1.0pt\usepackage{subfig} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.14} \begin{document} ...
2
votes
0answers
144 views

Wrong colormap when using matlab2tikz for 2D surface plot

I am currently using matlab2tikz, trying to import a Matlab surf plot, where I view only two-dimensions: I am using a custom colormap, but the error occurrs even with the standard colormap. The ...
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 ...
0
votes
1answer
422 views

.tikz file: legend differs from the original matlab figure

I have created a Matlab figure. I have converted the figure to a .tikz file using the matlab2tikz script. The legend of my .tikz - file, however, is different from the Matlab-figure. For example, the ...
1
vote
0answers
234 views

PGFPlots: PNG has wrong rotation in .tex after matlab2tikz export

I got a problem, which I am somehow not able to solve for days. I created a graph in Matlab and wanted to import it in my LaTeX document. This is my MATLAB Code. figure(); subplot(2,1,1); L_input = ...
1
vote
1answer
332 views

matlab2tikz: legend overlaps with x-label

I have created a Matlab figure and converted it to tikz using the matlab2tikz script. I plot a legend outside of my figure. Unfortunately this legend overlaps with my x-axis label. Can anybody tell me ...
2
votes
1answer
702 views

How to scale a matlab graphic and include it in LaTeX using matlab2tikz

I have created a Matlab graphic. Now I want to use matlab2tikz in order to include the graphic in a LaTeX document. Therefore, I scale my graphic in Matlab, using: %LaTeX set up height=10; width=10;...
2
votes
1answer
530 views

matlab2tikz Vertical line in bode plot

I have used Matlab to plot a bode diagram of a transfer function. After plotting I used matlab2tikz() to export it as a *.tikz file. I then imported the bode diagram in Latex by using \begin{figure} ...
1
vote
0answers
200 views

Matlab2tikz problem [closed]

I have used the matlab2tikz package from http://se.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz-matlab2tikz for some time and never had any serious problems with it. Until now; ...
2
votes
0answers
369 views

matlab2tikz : Wrong fonts in Axis/Tick labels and Legend in tikz figure [closed]

I am using Matlab 2016b on a Linux 64 bit machine. I have the following figure in Matlab: Using a script, I make some changes to the figure text and then call matlab2tikz function. This script is ...
3
votes
2answers
446 views

TikZ: How to get a smooth surface plot without significant increasing needed memory

I want to produce smooth surface plot created with matlab2tikz. However, if I use [shader = faceted interp] instead of [shader = flat corner] the required document memory increases from 34KB to ...
1
vote
0answers
175 views

Matlab plots 2 tikz. Axis collapse [closed]

I'm writing my thesis, and it seems I need to convert all my images to tikz and include them in my TeX file. I used matlab2tikz command to convert the plots to tikz. It was not that hard, but there ...
2
votes
0answers
170 views

Nested tikzpicture using \node

I want to make comments onto a matlab2tikz figure. One way is to nest the matlab generated code using a \node inside a tikzpicture. However, when I do so, the axis labels and axis tick labels get "...
2
votes
2answers
741 views

Problem with ticks and caption when importing Matlab figures using matlab2tikz

I have created a nice plot in Matlab and converted it into tikz with the matlab2tikz library. It works great but there are two problems: The ticks of the axis are not good. Especially for the y-axis ...
1
vote
1answer
573 views

Axis scaling issue with matlab2tikz

I use matlab2tikz to efficiently save Matlab plots as vector graphics for latex documents. I have axis scaling issues compared to the Matlab plot and the one rendered in my document. The plot from ...