On Tue, Jul 29, 2014 at 11:16 AM, Doug Hunt <[email protected]> wrote:
> Hi Tsuyoshi:
>
> I've never used PDL and PDL::Graphics::PLplot with Moose.  PDL list folks:
> have any of you had this problem and overcome it?
>
> As to item 2, I think code like this for $y:
>
> my $y = pdl(0,1,2,104,4,5,24,7,8,99);
>
> would make things work.  Currently, your $y is a reference
> to a perl list, not a pdl object.
>
> Regards,
>
>   Doug Hunt
>
>
> [email protected]
> Software Engineer
> UCAR - COSMIC, Tel. (303) 497-2611
>
> On Tue, 29 Jul 2014, tsuyoshi okita wrote:
>
>> Hello,
>>
>> Thank you for providing us PDL::Graphics::PLplot.
>> I have a several questions I need to ask.  I could not find any mailing
>> list for PDL::Graphics::PLplot.
>> I just started to using PDL::Graphics::PLplot.  So my questions might
>> sound silly to you, but I hope you can bear with it.
>>
>> 1. I attached a simple perl code.  This is what happends.
>> if I add use Moose; it gives a following message:

This is because Moose enables the strict pragma and PDL
exports the inner() routine which apparently collides with another
declaration/definition of inner().

>> "Prototype mismatch: sub main::inner: none vs (;@) at (eval 168) line 8."
>> 2. I have been trying to plot a bundle of data.
>> my $x = sequence(10);
>> my $y  = [0,1,2,104,4,5,24,7,8,99];
>>  $pl->xyplot($x, $y,);
>>  $pl->close;
>>
>> this code gives me this error message:
>> "Can't call method "minmax" on unblessed reference at
>> /usr/local/lib/perl/5.14.2/PDL/Graphics/PLplot.pm line 1595."

As Doug points out, the problem is that PDL::Graphics::PLplot takes
PDL objects as input rather than perl list/list-refs.  If you need to use
both the list ref and a PDL object you can use the pdl() constructor
to make a "piddle" and the ->unpdl method to regenerate an
equivalent set of list refs.

>> I understand this has to do with $y.  It works if I add my $y =
>> sequence(10);.
>> I looked into PDL::Graphics::PLplot site and plplot documents, but nothing
>> mention about sequence().
>>
>> I am sure you are busy, but if you can help me out, I would be grateful.

I'm glad Doug was able to help you out.  I recommend joining the perldl
mailing list which is where PDL is supported and is usually the best
way to get help.

--Chris

>> Thank you.
>> Tsuyoshi Okita

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to