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
0
votes
0answers
22 views

Subfigures overlapping with document margins and caption and subcaption not centered with figure and subfigures, using tikzpictures from matlab2tikz

I have a problem with the following code: I'm making a figure with two subfigures using the subcaption package. Each subfigure is a tikzpicture in a separate .tex file generated by matlab2tikz. The ...
0
votes
1answer
28 views

Scale Matlab Figure's Outer Frame Using matlab2tikz To Exactly 15.5 cm Width

I would like to scale my Matlab figure to exactly 15.5 cm in my LaTeX document. I am creating the figure like this: figure('Name','FigureName','units','centimeters','position',[0 0 15.5 7.75]) I am ...
0
votes
0answers
13 views

Matlab2tikz: Multiple Column Legend

I am creating a Matlab figure with multiple columns using the legend command: legend('DataX1','DataX1','NumColumns',2) This will give me a figure such as: Now I would like for this figure to be ...
0
votes
1answer
52 views

insert 3 Tiks as a one picture

I want to insert this 3 tikz like the picture above I use Matlab2Tikz and i have a problems with it I can change every position (at=) but this hard to do and take a long time this is the 3 tikz ...
1
vote
2answers
40 views

matlab2tikz Surface plot colors are dark and faded

I am using matlab2tikz to produce colored surface plots. When I compile the TikZ file created, the colors are dark and washed out. I have looked at the posts 'parula' colormap in pgfplots ...
0
votes
0answers
45 views

matlab2tikz width of figure incorrect

Using matlab2tikz I experience a strange behavior. My idea was, following https://tomlankhorst.nl/matlab-to-latex-with-matlab2tikz/, to create a figure in Matlab (R2019) and then use it in Latex ...
0
votes
0answers
27 views

matlab2tikz: Change font type for text plot

I use matlab2tikz in order to export a figure from Matlab R2019 to Latex. I have a sample figure figure() hold on; plot(sin(0:.01:pi)); text(100,.5,'Test','FontSize', 18, 'Color', 'red', 'FontName', '...
0
votes
0answers
35 views

matlab2tikz: Disable legend

I have a matlab code, creating a set of figures, which I want to export to Latex using matlab2tikz. Unfortunately I can't figure out how to export without a legend, using Matlab R2019b and matlab2tikz ...
0
votes
0answers
45 views

3D Polar Plot in sperical coordinate system in PGF/Tikz - Matlab2tikz fails, me too. (CST MWS Antenna FarField pattern)

I have simulated an Antenna in CST and want to plot the 3D pattern. The resolution is fairly low with a step size of 20°. Matlab2tikz won't help because it creates huge PDFs (60kB tex file to 5MB ...
0
votes
1answer
36 views

Setting axis x line* and axis y line* globally

I have encountered a "problem" to which I was not yet able to find a solution. If one exports a figure with tikzplotlib or matlab2tikz, the lines axis x line*=bottom, axis y line*=left, are ...
0
votes
1answer
46 views

Scaling a tikzpicture generated with matlab2tikz

I have a figure Plot1.tex generated with matlab2tikz (matlab2tikz by Nico Schlömer). I want to include it in my document and scale its width and height like this: \documentclass[a4paper]{report} \...
0
votes
0answers
79 views

Matlab2Tikz Runtime on LaTeX too long

I am using this thing called matlab2tikz which converts MATLAB figures into LaTeX (TikZ) figures. What I have been doing is that I have been using Simulink to do my simulations, and store the data ...
1
vote
0answers
60 views

S-grid for eigenvalues map on tikz

I'm currently working with eigenvalues analysis and to that I don't use the normal grid, but the s-grid (grid of constant damping factors and natural frequencies). I use the function matlab2tikz to ...
0
votes
0answers
42 views

matlab2tikz image not compiling

So, I've used matlab2tikz twice, and both times the image didn't compile at first. The first time, I somehow managed to get going, but it was a long time ago, and now I don't remember exactly what was ...
0
votes
0answers
65 views

Tikz: Dimension Too Large

I'm currently working on my Thesis using Overleaf and TexMaker. As I include a few high res images that i exported via matlab2tikz, they are very big and detailed. Recently I encountered an error in ...
0
votes
0answers
30 views

Highlighten specific x-axis values

I need some help to plot a small figure for my thesis. I know that the question is towards Matlab, but I export the figure as a tikzpicture and genuinely think that you guys deliver the better ...
1
vote
1answer
79 views

How to control font size with a standalone pgfplot

I want to control the font size of an embedded, standalone pgfplot. I realized it by defining a \newcommand (see the MWE). My question is, is there a better solution? Maybe I should mention that ...
0
votes
0answers
55 views

NaN values in 3D scatterplot with colormap

Edit: I added my code to the question. NaN and zero are both black. I only want zero to be marked black and NaN values have to be transparant. Is there a way I can make NaN values transparant in a ...
0
votes
0answers
17 views

Font name of matlab2tikz plot

I just started using matlab2tikz and I have a question in that regard. What is the name of the default font when plotting via matlab2tikz ?
2
votes
0answers
82 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
40 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
72 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
92 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
81 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
272 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
270 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
74 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
100 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
69 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
96 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
371 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 ...
2
votes
1answer
366 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
114 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
238 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
120 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
162 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
655 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
470 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
312 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
238 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
488 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
1k 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
156 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
158 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
471 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
392 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
800 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
674 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
235 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
389 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 ...