help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tikz backend


From: Ben Abbott
Subject: Re: Tikz backend
Date: Thu, 10 May 2012 09:51:06 -0400

On May 10, 2012, at 9:14 AM, Reza Housseini wrote:

> 
> 
> On Thu, May 10, 2012 at 3:05 PM, Ben Abbott <address@hidden> wrote:
> 
> On May 10, 2012, at 9:02 AM, Reza Housseini wrote:
> 
> > On Thu, May 10, 2012 at 2:57 PM, Ben Abbott <address@hidden> wrote:
> >
> > On May 10, 2012, at 8:48 AM, Reza Housseini wrote:
> >
> > > On Thu, May 10, 2012 at 1:49 PM, Ben Abbott <address@hidden> wrote:
> > >
> > > On May 10, 2012, at 1:48 AM, Reza Housseini wrote:
> > >
> > > > Hi,
> > > >
> > > > I've recently found this talk about the tikz backend Søren programmed. 
> > > > Because I think this is a very elegant way to produce plots out of 
> > > > octave, I wanted to ask if there is any progress in this direction? 
> > > > I've attached the latest source of the code I found.
> > > > Reza
> > > >
> > > > Hi All
> > > > I recently had to produce some graphics using TikZ for a paper. Doing
> > > > this made me realise what a simple way of expressing graphics TikZ
> > > > really is. I just spend an hour or two hacking a TikZ backend for the
> > > > graphics system together. I'm attaching the code.
> > > > To see it in action, run
> > > >   demo print_tikz
> > > > from Octave and
> > > >   pdflatex mytest.tex
> > > > from your shell. This will produce a 'mytest.pdf' for you to look at.
> > > > The code is very incomplete, and I'm not sure if I'll ever have the time
> > > > to finish it, but I thought I'd share anyway.
> > > > Søren
> > > > <print_tikz.m>
> > >
> > > Nico Schloemer has written an implementation that supports most plots (I 
> > > think there are still some 3D features missing).
> > >
> > >        http://win.ua.ac.be/~nschloe/content/matlab2tikz
> > >
> > >        https://github.com/nschloe/matlab2tikz
> > >
> > > Last year he modified the sources to be compatible with Octave.
> > >
> > > Ben
> > >
> > >
> > > Cool, thank you ben!
> > >
> > > The script gave an error, that the string function "split" is undefined. 
> > > Do I have to install a package or is my installation of Octave broken?
> >
> > If the error is from matlab2tikz, then please report the error to the 
> > matlab2tikz forum below.
> >
> >        http://win.ua.ac.be/~nschloe/forum/12
> >
> > If the error is from one of Octave's functions then please provide more 
> > information.
> >
> > Ben
> >
> > It's a missing function in my installed Octave. In the manual 
> > http://sunsite.univie.ac.at/textbooks/octave/octave_6.html is the function 
> > "split" mentioned. But when I type split on the command window comes this:  
> > error: `split' undefined
> > My question was, if I should install additional packages to use the 
> > function split?
> >
> > Reza
> 
> That site is for a very old version of Octave. The split() function has been 
> replaced by strsplit()
> 
> Ben
> 
> What about the Matlab compatibility? This function returns a cell array, but 
> in Matlab it is returning something different..

Matlab doesn't have an strsplit() function. In matlab2tikz I see ...

      if strcmpi(env, 'MATLAB')
          split = char(regexp(versionA, '\.', 'split'));
      elseif strcmpi(env, 'Octave')
          split = strsplit(versionA, '.');
      end

So, when running Matlab, regexp() is used, and when running Octave strsplit() 
is used.

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]