Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2665

Re: set linetype cycle n

From Ethan A Merritt <EAMerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: set linetype cycle n
Date 2014-12-10 08:41 -0800
Organization made entirely of Lego
Message-ID <m69t37$qam$1@dont-email.me> (permalink)
References <547f042f$0$2879$e4fe514c@news2.news.xs4all.nl> <m5rbh5$qad$1@dont-email.me> <5486e194$0$2904$e4fe514c@news2.news.xs4all.nl> <m67dbp$q5c$1@dont-email.me> <5488764c$0$2956$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


Alex van der Spek wrote:

> Thanks that helps but using:
> 
> gnuplot 5.0 rc1 of 2014-07-23
> 
> gnuplot> set linetype cycle 4
> gnuplot> show linetype
> 
> (shows 8 default defined linetypes and mentions a cycle of 4, so far
> so good)
> 
> plot for [i=1:8] i w lp
> 
> (plots 8 horizontal lines as per the 8 defined linetypes. No color
> cycle at 4.)
> 
> May be this is because of my older CVS compiled version?

I suspect it is because you have not undefined ("unset") linetypes
5 through 8.  Note that a defined linetype will be used in favor
of a recycled linetype.

You probabaly want
    set linetype cycle 4
    unset for [l=5:99] linetype l

	Ethan

> 
> Thanks in advance,
> Alex van der Spek
> 
> 
> On Tue, 09 Dec 2014 10:00:41 -0800, Ethan A Merritt wrote:
> 
>> Alex van der Spek wrote:
>> 
>>> On Thu, 04 Dec 2014 20:15:50 -0800, Ethan A Merritt wrote:
>>> 
>>>> Alex van der Spek wrote:
>>>> 
>>>>> It appears as if at least in the CVS version the cycle of
>>>>> linetypes is limited to (hardcoded as) 8.
>>>> 
>>>>    Not correct.
>>>>    Is there something in the docs or demos that gives that
>>>>    impression?
>>>> 
>>>>> Would be nice to be able to set the cycle to an integer of the
>>>>> user's choice.
>>>>> 
>>>>> Is that possible?
>>>> 
>>>>    set linetype cycle N
>>>> 
>>>> Of course if you choose a large value of N you have to first define
>>>> at least that many linetypes for it to make sense.
>>>> 
>>>> 
>>>>> Regards,
>>>>> Alex van der Spek
>>> 
>>> 
>>> The 5.1 PDF docs do not refer to any other possible choice. Page 133
>>> in the PDF only shows 8.
>>> The full syntax of the command I could not find.
>>> 
>>> 
>>> I was interested in setting N to values smaller than 8, say 4 or 3.
>>> Would make it easy to plot repeat experimental data with the same
>>> linetype, save for the dashtype.
>> 
>> Here is a full description, which seems overly complex to put in the
>> help files.
>> 
>> Consider the commands
>> set linetype cycle N
>> plot $FOO with lines linetype 25
>> 
>> If a "linetype 25" has previously been defined, this is what the
>> program
>> will use.   If there is no previously defined linetype 25, then the
>> program will instead use line properties from a linetype between 1
>> and N:
>> newlinetype = (25-1) % N + 1
>> 
>> So if N=5 then linetype 25 will use the color, width, etc of linetype
>> 5. But if N=2 or N=3 or N=4 then linetype 25 will use the properties
>> of linetype 1 because 2,3,4 are factors of 24 and therefore 25 is the
>> first member of a new cycle of N.
>> 
>> Ethan

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

set linetype cycle n Alex van der Spek <zdoor@xs4all.nl> - 2014-12-03 12:38 +0000
  Re: set linetype cycle n Ethan A Merritt <EAMerritt@gmail.com> - 2014-12-04 20:15 -0800
    Re: set linetype cycle n Alex van der Spek <zdoor@xs4all.nl> - 2014-12-09 11:48 +0000
      Re: set linetype cycle n Ethan A Merritt <sfeam@users.sourceforge.net> - 2014-12-09 10:00 -0800
        Re: set linetype cycle n Alex van der Spek <zdoor@xs4all.nl> - 2014-12-10 16:35 +0000
          Re: set linetype cycle n Ethan A Merritt <EAMerritt@gmail.com> - 2014-12-10 08:41 -0800
            Re: set linetype cycle n Alex van der Spek <zdoor@xs4all.nl> - 2014-12-12 10:06 +0000

csiph-web