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
1 answer
46 views

Matlab2tikz and alignment: i need help

I made matlab2tikz convert two matlab graps into .tex files, the first image generated the following code: \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0....
Davide's user avatar
  • 3
0 votes
0 answers
30 views

centering matlab2tikz tex file in latex

I used matlab2tikz to convert my plot to a tex file and added it into latex but I encountered some problems. Firstly, my plot isn't in the center of the page. How can I tackle this issue? Secondly, ...
Milito's user avatar
  • 45
0 votes
0 answers
23 views

how to include a bubblechart from matlab in a tex document?

I created a simple bubblechart in Matlab and want to include it in my tex document. Since matlab2tikz can not convert bubblechart to pgfplots, I used exportgraphics in Matlab and saved the bubblechart ...
Simon's user avatar
  • 251
0 votes
0 answers
12 views

Using Matlab2Tikz in Texstudio error message: Paragraph ended before \pgfplots@@environment@axis was complete

I am currently trying to implement my Matlab results into my latex file in Texstudio. To save the figures from matlab i used the Matlab2Tikz function and saved them as a .tex and a .tikz file. My ...
Monsterhunter Mario's user avatar
0 votes
0 answers
41 views

Two matlab2tikz figures side by side

I want to have two figures generated with matlab2tikz side by side. I tried \documentclass[12pt,a4paper]{report} \usepackage{parskip} \usepackage{blindtext} \usepackage[onehalfspacing]{setspace} \...
Name123's user avatar
2 votes
0 answers
73 views

matlab2tikz: bunch of error messages in tex when adding the jet colormap to a surfplot

I created a surf plot in matlab which is also correctly depicted in the figure. f3 = figure(3); p3 = surf(X,Y,Z); hold on; p3.LineStyle = 'none'; colorbar; %change the color map colormap(f3, jet(256))...
Simon's user avatar
  • 251
1 vote
0 answers
29 views

Error in grid of log scaled .tikz file generated by matlab2tikz

I have generated a tikz file by matlab2tikz. The figure has grids in log mode. However, it does not show the grid at 2x10^7 although xmax=3x10^7, as shown here: When I increase the xmax=4x10^7, it ...
vefa's user avatar
  • 43
1 vote
1 answer
167 views

Error in matlab2tikz

I am attempting to plot two graphs together in one plot using matlab2tikz and I am facing a basic syntax issue that I have been trying hours to search for. The error is as follow: Extra }, or ...
SPARSE's user avatar
  • 298
0 votes
1 answer
59 views

pgfplots Error: The provided colormap positions are not multiples of the prescribed mesh width h=1.0000000000

I produced the output of a surf with matlab2tikz with an individual colormap, which led to the color of every individual pixel being set to a color value, and every surf data point being assigned an ...
MP Felder's user avatar
0 votes
0 answers
34 views

matlab2tikz: pgfplots surf with patchmap causing missing number

I try to convert a MATLAB surf into a pgfplots plot using matlab2tikz. It does not compile with the error <to be read again> \pgfpl@cm@surfmap@X@size l.44 }; Do I miss provide a parameter or ...
MP Felder's user avatar
0 votes
1 answer
74 views

tikz input/includestandalone using axis mostly yields Missing/Extra {}

Im trying to include several graphics with \includestandalone (or \input if necessary). Neither my own simple tikzpicture as standalone with axis are able to compile nor the ones I create e.g. with ...
Pratched's user avatar
  • 409
1 vote
1 answer
466 views

Matlab Code in a Thesis

I'd like to insert matlab code just by copying and pasting the code I want, I'd like it in black, no colours, if it's possible I'd like in a text box with the number of lines, but not necessary if it ...
Noob_Latex's user avatar
0 votes
1 answer
157 views

How can I draw this figure using Tikz (Damped Oscillations)?

This is a figure realized using Matlab, but it gives an awful view to my article when I add it directly, is there any possibility to transform it into a TikZ code ? Thanks in advance.
Eduardo.ni's user avatar
0 votes
0 answers
377 views

Problem with Lualatex and hyperref

I have a lot of matlab2tikz generated figures which look good, but when I input them in my maincode it leady to exceeded capacity error. I figured out, when I place each Plot on a new page the memory ...
Alexander Schwarzwälder's user avatar
-1 votes
1 answer
169 views

changing reference line of `\closedcycle`" and "`fill`" option in pgfplots

I have used Matlab2tikz package to obtain tikz files of some plots drawn by Matlab. They have a problem in showing colored confidence intervals using "fill" option. My conjecture is that the ...
Ali's user avatar
  • 13
0 votes
0 answers
200 views

How to convert give you Matlab figures in Latex a cleaner look

I am trying to import my Matlab graphs into LaTex. I already know how to do it. However, the graphs have poor quality and are unproportioned. How do you get those Mablab figures to appear "HD&...
Missael's user avatar
  • 185
1 vote
1 answer
129 views

How can I add string formatting for listings code?

How do I make sure that string-like code like "file" below (on line 7) gets same formating (purple/muave) like strings below? \documentclass{article} \usepackage{verbatim} % code \...
Clone's user avatar
  • 463
1 vote
0 answers
197 views

Removing scientific notation of y-axis

Hello fellows and folks! I am having a very hard time trying to figure out how to remove the scientific notations on the y-axis of my graphs. The graphs are made in MATLAB and then converted into TikZ ...
jdoubleu's user avatar
-1 votes
1 answer
214 views

matlab2tikz - problem with german letters - ä, ö, ü, \cdot and r_N

I'm using matlab2tikz the first time and get some problems with the first graph. I could seperate the problem. In the moment, I insert german letters like ä, ö, ü or special code like \cdot and r_N in ...
Kopi's user avatar
  • 65
1 vote
1 answer
306 views

Bar Chart - Change Face Color Separately For Every Single Bar

I am using Matlab's bar command to create a bar-chart. I am using matlab2tikz to convert it. I would like to change the face color of every single bar separately to an rgb color of my choice. In ...
Timon's user avatar
  • 127
0 votes
2 answers
234 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 ...
Timon's user avatar
  • 127
0 votes
1 answer
404 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 ...
Mohamed Hasnaoui's user avatar
1 vote
2 answers
318 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 ...
Aaron Hendrickson's user avatar
0 votes
0 answers
222 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 ...
Martin Herrmann's user avatar
0 votes
1 answer
419 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 ...
Martin Herrmann's user avatar
0 votes
0 answers
203 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 ...
Homosapiens's user avatar
0 votes
1 answer
976 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 ...
pbaer's user avatar
  • 360
0 votes
1 answer
255 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} \...
Dave's user avatar
  • 13
0 votes
0 answers
169 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 ...
Superman's user avatar
  • 1,571
1 vote
0 answers
130 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 ...
Gpereira's user avatar
0 votes
0 answers
58 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 ...
Eduardo Alves da Silva's user avatar
0 votes
0 answers
292 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 ...
aladin's user avatar
  • 115
0 votes
0 answers
57 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 ...
aladin's user avatar
  • 115
1 vote
1 answer
620 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 ...
TomTom's user avatar
  • 141
0 votes
0 answers
146 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 ...
Staffan Hengst's user avatar
2 votes
0 answers
117 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-...
BambOo's user avatar
  • 8,739
0 votes
0 answers
59 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 ...
SKPS's user avatar
  • 411
0 votes
0 answers
154 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 ...
Arthur's user avatar
  • 113
0 votes
0 answers
178 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....
Aris Martin Accola's user avatar
2 votes
0 answers
138 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[...
user182156's user avatar
4 votes
1 answer
511 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 ...
jelle's user avatar
  • 41
0 votes
1 answer
409 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 ...
drw5ff's user avatar
  • 1
1 vote
0 answers
93 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 ...
Jarvis's user avatar
  • 45
1 vote
1 answer
288 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 ...
BambOo's user avatar
  • 8,739
2 votes
1 answer
334 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] ...
Matt's user avatar
  • 161
2 votes
1 answer
204 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 ...
Joe's user avatar
  • 9,002
2 votes
0 answers
916 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 ...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
1 answer
764 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 ...
Martín Torres Brunengo's user avatar
1 vote
1 answer
148 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 ...
SKPS's user avatar
  • 411
2 votes
2 answers
718 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 ...
BambOo's user avatar
  • 8,739