plot comes out rotated 90 degrees clockwise

I'm very excited about this program. But I am getting the following problem. I created a simple test figure. Ran matlab2tikz, imported the code in a latex file, with the necessary two packages. But when I compile the figure is rotated clockwise. (The numbers are upright though and cross with lines on the figure.)

Here is the tikz code that was generated:

\begin{tikzpicture}

% defining custom colors
\definecolor{mycolor1}{rgb}{0,0.5,0}

\begin{axis}[%
view={0}{90},
scale only axis,
width=4.40889in,
height=3.47733in,
xmin=0, xmax=40,
ymin=0, ymax=0.025,
xmajorgrids,
ymajorgrids]
\addplot [
color=blue,
solid,
mark=*,
mark options={solid}
]
coordinates{ (1,0.020019) (2,0.0196972) (3,0.0193682) (4,0.019032) (5,0.0186631) (6,0.0182826) (7,0.0178939) (8,0.0174821) (9,0.0170543) (10,0.0166241) (11,0.0161835) (12,0.0157236) (13,0.0152488) (14,0.0147626) (15,0.0142811) (16,0.0137848) (17,0.0132726) (18,0.0127796) (19,0.012278) (20,0.0136342) (21,0.0141504) (22,0.0132725) (23,0.0126133) (24,0.0119676) (25,0.0112995) (26,0.010599) (27,0.00986985) (28,0.00913418) (29,0.00835332) (30,0.00752767) (31,0.00666226) (32,0.0057953) (33,0.00491368) (34,0.00405269) (35,0.00321908) (36,0.00243318) (37,0.00172627) (38,0.00114052) (39,0.000754236)
};

\addplot [
color=mycolor1,
solid,
mark=*,
mark options={solid}
]
coordinates{ (1,0.0196294) (2,0.0193333) (3,0.0190309) (4,0.0186927) (5,0.0183437) (6,0.0179881) (7,0.0176075) (8,0.0172113) (9,0.016807) (10,0.0163803) (11,0.0159288) (12,0.0154646) (13,0.014988) (14,0.0145052) (15,0.0140097) (16,0.0135005) (17,0.0130127) (18,0.0125179) (19,0.0120055) (20,0.012902) (21,0.0136014) (22,0.0129639) (23,0.0123405) (24,0.0116966) (25,0.0110247) (26,0.0103298) (27,0.00963526) (28,0.00890231) (29,0.00812862) (30,0.00731983) (31,0.00650099) (32,0.0056425) (33,0.00475446) (34,0.00385178) (35,0.00296757) (36,0.00212357) (37,0.0013398) (38,0.000669208) (39,0.000188041)
};

\end{axis}
\end{tikzpicture}

OK, now I see that the view is {0}{90}. When I changed it to {0}{0} it then compiled correctly upright. But why did matlab2tikz create the code with this rotated view? I had a very standard figure, created with plot and had not applied any options to the plot.

Hi,

that seems very much like a bug. Can you post the MATLAB(R) code here? I'd be very helpful to create an issue on GitHub; that makes it easier to follow up.

Cheers,
Nico

Addthis