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 ...
0
votes
0answers
50 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
42 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[...
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 ...
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 ...
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 ...
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 ...
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 ...
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
505 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
191 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 ...
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 ...
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 ...
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
1answer
333 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
704 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 "...
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 ...
2
votes
0answers
206 views

Standalone tikz graphic with invisible Y-axis label

I want to compile a standalone tikz graphic using XelaTeX and include it in a larger document. The MWE shows the effect. When I do, the Y-axis labels disappear. The X-axis label remains. If I add a ...
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 ...
0
votes
0answers
147 views

matlab2tikz: Generated file is several MB due to resolution

I am exporting a surface-plot in Matlab to tikz using matlab2tikz, a mwe of the figure is here: stp = 0.001; [xx yy] = meshgrid(0:stp:1, 0:stp:1); surf(xx, yy, zeros(size(xx)), sin(xx), 'EdgeColor', '...
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 = ...
8
votes
1answer
2k views

pgfplotsset append style is not appended to tikzpicture axis environment

When using every x tick label/.append style={font=\scriptsize} in combination with \pgfplotsset outside the tikzpicture environment, the pgfplotssetcommand from the preamble will be ignored (...
2
votes
1answer
5k views

How to convert a matlab figure to a latex code? (not to a graphic)

First of all sorry for my bad english. I want to convert my matlab figure to a latex code (no graphic). I want the latex code. I know its possible. But i dont know how. Of course i can also export my ...
1
vote
1answer
911 views

\begin{tikzpicture} ended by \end{document}

I experience odd behavior of one of my figures created with Matlab2Tikz. I have three alike figures which differ only in terms of data points. Weirdly only the one with the smallest amount of data ...
1
vote
1answer
420 views

How to export a 3D quiver plot from MATLAB with matlab2tikz correctly?

Using matlab2tikz version 1.0.0 the MATLAB code scatter3([0 1],[0 1],[0 1]); hold on quiver3(0,0,0,1,1,1,0); matlab2tikz('test.tex'); produces and the tex file test.tex. Plotting this file without ...
1
vote
0answers
183 views

Out of memory for large scatter plot in tikz

I have exported four Matlab plots with matlab2tikz to tikz. Each plot has 10000 scatter points. When I try to use it in LaTeX I'm getting an out of memory error. I have also converted the figures to ...
2
votes
1answer
1k views

Matlab2tikz problem with contourf

I´ve got a problem concerning inserting a Tikz-Plot from Matab into my Tex-file. The matlab-script I use to produce the plot is (Contourf-Plot): %% clear all; clc; format bank; fontname = '...
1
vote
1answer
986 views

Inserting multiple legends in a pgfplot with one \addplot graphics

I would like to have the legends match the line plots from the diagram. I have referred to a lot of legend questions, but I couldn't find one where they were trying to make multiple legends for a ...
2
votes
0answers
1k views

How to export plots with 2 y-axis into tikz with matlab2tikz

I want to export a Matlab figure with 2 y-axis to a tikz-plot with matlab2tikz. The figure is shown in the following picture. The blue plot belongs to the left y-axis and the 2 red plot belong to the ...
3
votes
0answers
133 views

Matlab2Tikz+PgfPlots Violating Margins [closed]

I use this command in matlab matlab2tikz('fig_blank.tex','width','\textwidth','height','5cm') in order to make a tikzpicture out of this matlab plot. My MWE in PdfLaTeX \documentclass{article} \...
2
votes
2answers
742 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 ...
2
votes
0answers
266 views

MATLAB generated Tikz not working [closed]

When trying to use a .tikz file generated from a MATLAB script, the .tex file errors and is not able to build. The .tex code is as follows: \documentclass{article} \usepackage{amsmath} \...