help-octave
[Top][All Lists]
Advanced

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

Re: Scaling distance between xlabel/ylabel and axes


From: Ben Abbott
Subject: Re: Scaling distance between xlabel/ylabel and axes
Date: Fri, 22 Oct 2010 16:23:14 +0800

On Oct 22, 2010, at 3:45 PM, Tobias Schmid wrote:

> Am 22.10.2010 03:30, schrieb Ben Abbott:
>> 
>> On Oct 22, 2010, at 12:09 AM, Ben Abbott wrote:
>>> On Oct 21, 2010, at 11:58 PM, Tobias Schmid wrote:
>>>> Am 21.10.2010 16:37, schrieb Ben Abbott:
>>>>> On Oct 21, 2010, at 6:08 PM, Katzenman wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> yes, that ist exactly what I'm looking for.
>>>>>> I just need to get a proper scaling for one plot.
>>>>>> 
>>>>>> An fontsize and type is not important, because I'm gonig to replace it,
>>>>>> using \psfrag in LaTex.
>>>>>> So for me it is just important to have a scaling, where there is no
>>>>>> overlapping of x/ylabel and x/yTicks.
>>>>>> 
>>>>>> And if it is possible to get a legende without overlapping labels, this
>>>>>> would be even better.
>>>>>> If that is not possible, I'll do it without using a legende and discribe 
>>>>>> the
>>>>>> curves in the caption of me figure in LaTeX.
>>>>>> 
>>>>>> Thanks for your help
>>>>>> 
>>>>>> Tobias
>>>>> I had considered adding psfrag support to Octave. However, as psfrag is 
>>>>> rather dated and no longer maintained we decided not to add that support.
>>>>> 
>>>>> However, if you are interested in that functionality, I've attached the 
>>>>> function. This function works with the current developers sources. I 
>>>>> haven't tried it with the 3.2.x series, but I expect it will work.
>>>>> 
>>>>> Please let me know if it works well for you. Criticism is welcome.
>>>>> 
>>>>> Ben
>>>> Hello Ben,
>>>> 
>>>> I tried to use your code, but I got the error messages added below.
>>>> 
>>>> psfrag(Abbildung ,"test" ,'fontsize', 18 ,'height','\\psfragheight' , 'wid
>>>> th' , '\\psfragwidth')
>>>> error: mat2cell: dimension can not be empty
>>>> error: called from:
>>>> error: /home/tobias/Diplomarbeit/Octave/psfrag.m at line 342, column 15
>>>> error: /home/tobias/Diplomarbeit/Octave/psfrag.m at line 236, column 17
>>>> 
>>>> Did I forget to hand over the parameter dimension? In the help enty no 
>>>> parameter called dimension in mentioned?
>>>> 
>>>> By the way, would this function solve my problem with the distances 
>>>> between the labels and the entries of the legende , which are not scalable.
>>>> 
>>>> Tobias
>>>>       
>>> I'll take a look at this tomorrow. In the meantime, does you plot have 
>>> ticklabels for each visible axes?
>>> 
>>> Ben
>> I found a two incomplete features of Octave 3.2.x that resulted in the error 
>> you saw with psfrag.m. I've attached a version that detects the version of 
>> Octave and provides an optional approach.
>> 
>> Regarding your call to psfrag, the proper syntax is ...
>> 
>> psfrag(Abbildung ,"test" ,"fontsize", 18 ,"height","\\psfragheight" , 
>> "width" , "\\psfragwidth")
>> 
>> or ...
>> 
>> psfrag(Abbildung ,'test' ,'fontsize', 18 ,'height','\psfragheight' , 'width' 
>> , '\psfragwidth')
>> 
>> Essentially, when using double quotes (") two backslashes are needed. When 
>> using a single quote (') only one backslash is needed.
>> 
>> Psfrag may not resolve our problem with the overlaping labels.
>> 
>> Ben  
> Hello,
> 
> I now I get a .tex file.
> But I doesn't export the .eps file.
> 
> Tobias

I tried to run your script to find the error, but I'm missing some files.

octave-3.2.3:4> spektrum_plotten
warning: addpath: /home/tobias/Diplomarbeit/Octave/Matlab-Programme: No such 
file or directory
warning: addpath: /home/tobias/Diplomarbeit/Octave: No such file or directory
warning: addpath: /home/tobias/gnuradio_git/gnuradio/gnuradio-core/src/utils/: 
No such file or directory
error: `read_complex_binary' undefined near line 4 column 19
error: called from:
error:   /Users/bpabbott/Development/Octave_Toolbox/psfrag/spektrum_plotten.m 
at line 4, column 18

However, I think I've discovered the problem and fixed it in the attached 
version.

While the tex/eps output won't have the proper spacing, you'll be able to 
adjust it by tweaking the eps file or the tex file.

Ben

Attachment: psfrag.m
Description: Binary data




reply via email to

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