Matlab compat question

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Matlab compat question

Dmitri A. Sergatskov
Can anyone with access to Matlab do:

plot(randn(3), ".y", "markersize", 24, "markeredgecolor", "k")
print t1.png

and send the resulting png?

Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

rdzman

On Jun 14, 2016, at 12:11 AM, Dmitri A. Sergatskov <[hidden email]> wrote:

Can anyone with access to Matlab do:

plot(randn(3), ".y", "markersize", 24, "markeredgecolor", "k")
print t1.png

and send the resulting png?

Dmitri.
--


Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

Dmitri A. Sergatskov
Thanks Ray!

So fltk and qt do it right and gnuplot does it wrong...

Dmitri.



On Tue, Jun 14, 2016 at 9:58 AM, Ray Zimmerman <[hidden email]> wrote:

On Jun 14, 2016, at 12:11 AM, Dmitri A. Sergatskov <[hidden email]> wrote:

Can anyone with access to Matlab do:

plot(randn(3), ".y", "markersize", 24, "markeredgecolor", "k")
print t1.png

and send the resulting png?

Dmitri.
--



Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

Daniel Sebald
On 06/14/2016 10:02 AM, Dmitri A. Sergatskov wrote:
> Thanks Ray!
>
> So fltk and qt do it right and gnuplot does it wrong...
>
> Dmitri.

I don't know if this is classified wrong.  The gnuplot toolkit accepts
'y' as yellow, but that is not a valid color in Octave (and Matlab?)
definitions (only 'k' 'r' 'g' 'b' 'm' 'c' 'w').  That's along the same
lines that Octave accepts "endwhile" as syntax whereas Matlab would
throw and error.  In both cases, different behavior for syntax not
defined.  It would be easy to change 'y' to black for gnuplot toolkit,
but I don't know if it makes a difference one way or another.

Dan


>
>
>
> On Tue, Jun 14, 2016 at 9:58 AM, Ray Zimmerman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>>     On Jun 14, 2016, at 12:11 AM, Dmitri A. Sergatskov
>>     <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>     Can anyone with access to Matlab do:
>>
>>     plot(randn(3), ".y", "markersize", 24, "markeredgecolor", "k")
>>     print t1.png
>>
>>     and send the resulting png?
>>
>>     Dmitri.
>>     --

Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

jbect
Le 20/06/2016 à 04:55, Daniel J Sebald a écrit :

> On 06/14/2016 10:02 AM, Dmitri A. Sergatskov wrote:
>> Thanks Ray!
>>
>> So fltk and qt do it right and gnuplot does it wrong...
>>
>> Dmitri.
>
> I don't know if this is classified wrong.  The gnuplot toolkit accepts
> 'y' as yellow, but that is not a valid color in Octave (and Matlab?)
> definitions (only 'k' 'r' 'g' 'b' 'm' 'c' 'w'). That's along the same
> lines that Octave accepts "endwhile" as syntax whereas Matlab would
> throw and error.  In both cases, different behavior for syntax not
> defined.  It would be easy to change 'y' to black for gnuplot toolkit,
> but I don't know if it makes a difference one way or another.

'y' is also the shortcut for yellow in Matlab:

http://fr.mathworks.com/help/matlab/ref/plot.html?requestedDomain=www.mathworks.com#inputarg_LineSpec

So, Octave should support 'y' in all graphics toolkits.

@++
Julien


Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

Dmitri A. Sergatskov
On Mon, Jun 20, 2016 at 12:02 AM, Julien Bect <[hidden email]> wrote:
Le 20/06/2016 à 04:55, Daniel J Sebald a écrit :
On 06/14/2016 10:02 AM, Dmitri A. Sergatskov wrote:
Thanks Ray!

So fltk and qt do it right and gnuplot does it wrong...

Dmitri.

I don't know if this is classified wrong.  The gnuplot toolkit accepts 'y' as yellow, but that is not a valid color in Octave (and Matlab?) definitions (only 'k' 'r' 'g' 'b' 'm' 'c' 'w'). That's along the same lines that Octave accepts "endwhile" as syntax whereas Matlab would throw and error.  In both cases, different behavior for syntax not defined.  It would be easy to change 'y' to black for gnuplot toolkit, but I don't know if it makes a difference one way or another.

'y' is also the shortcut for yellow in Matlab:

http://fr.mathworks.com/help/matlab/ref/plot.html?requestedDomain=www.mathworks.com#inputarg_LineSpec

So, Octave should support 'y' in all graphics toolkits.

@++
Julien



​I think the issue here is that marker "point" (.) is defferent from all other symbols.
It is kind of a singularity that does not have an internal structure (like border/Face).

So setting its borders to black makes entire marker black.

Dmitri.
--
 

Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

Daniel Sebald
On 06/20/2016 12:17 AM, Dmitri A. Sergatskov wrote:

> On Mon, Jun 20, 2016 at 12:02 AM, Julien Bect
> <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     Le 20/06/2016 à 04:55, Daniel J Sebald a écrit :
>
>         On 06/14/2016 10:02 AM, Dmitri A. Sergatskov wrote:
>
>             Thanks Ray!
>
>             So fltk and qt do it right and gnuplot does it wrong...
>
>             Dmitri.
>
>
>         I don't know if this is classified wrong.  The gnuplot toolkit
>         accepts 'y' as yellow, but that is not a valid color in Octave
>         (and Matlab?) definitions (only 'k' 'r' 'g' 'b' 'm' 'c' 'w').
>         That's along the same lines that Octave accepts "endwhile" as
>         syntax whereas Matlab would throw and error.  In both cases,
>         different behavior for syntax not defined.  It would be easy to
>         change 'y' to black for gnuplot toolkit, but I don't know if it
>         makes a difference one way or another.
>
>
>     'y' is also the shortcut for yellow in Matlab:
>
>     http://fr.mathworks.com/help/matlab/ref/plot.html?requestedDomain=www.mathworks.com#inputarg_LineSpec
>
>     So, Octave should support 'y' in all graphics toolkits.
>
>     @++
>     Julien
>
>
>
> ​I think the issue here is that marker "point" (.) is defferent from all
> other symbols.
> It is kind of a singularity that does not have an internal structure
> (like border/Face).
>
> So setting its borders to black makes entire marker black.
>
> Dmitri.

OK, I see what you mean.  Half of the symbols don't have an interior
(i.e., no face), of which '.' should be one, and it is the
MarkerEdgeColor that refers to the glyphs of the symbols, not
MarkerFaceColor.  Create a bug report?  Or lump that in with this one:

http://savannah.gnu.org/bugs/?47974

Dan

Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

Dmitri A. Sergatskov
On Mon, Jun 20, 2016 at 12:41 AM, Daniel J Sebald <[hidden email]> wrote:
On 06/20/2016 12:17 AM, Dmitri A. Sergatskov wrote:
On Mon, Jun 20, 2016 at 12:02 AM, Julien Bect
<[hidden email] <mailto:[hidden email]>>

wrote:

    Le 20/06/2016 à 04:55, Daniel J Sebald a écrit :

        On 06/14/2016 10:02 AM, Dmitri A. Sergatskov wrote:

            Thanks Ray!

            So fltk and qt do it right and gnuplot does it wrong...

            Dmitri.


        I don't know if this is classified wrong.  The gnuplot toolkit
        accepts 'y' as yellow, but that is not a valid color in Octave
        (and Matlab?) definitions (only 'k' 'r' 'g' 'b' 'm' 'c' 'w').
        That's along the same lines that Octave accepts "endwhile" as
        syntax whereas Matlab would throw and error.  In both cases,
        different behavior for syntax not defined.  It would be easy to
        change 'y' to black for gnuplot toolkit, but I don't know if it
        makes a difference one way or another.


    'y' is also the shortcut for yellow in Matlab:

    http://fr.mathworks.com/help/matlab/ref/plot.html?requestedDomain=www.mathworks.com#inputarg_LineSpec

    So, Octave should support 'y' in all graphics toolkits.

    @++
    Julien



​I think the issue here is that marker "point" (.) is defferent from all
other symbols.
It is kind of a singularity that does not have an internal structure
(like border/Face).

So setting its borders to black makes entire marker black.

Dmitri.

OK, I see what you mean.  Half of the symbols don't have an interior (i.e., no face), of which '.' should be one, and it is the MarkerEdgeColor that refers to the glyphs of the symbols, not MarkerFaceColor.  Create a bug report?  Or lump that in with this one:

http://savannah.gnu.org/bugs/?47974

Dan

​There is also 4808 :

https://savannah.gnu.org/bugs/?48208

Dmitri.
--


Reply | Threaded
Open this post in threaded view
|

Re: Matlab compat question

Daniel Sebald
In reply to this post by Daniel Sebald
On 06/20/2016 12:41 AM, Daniel J Sebald wrote:

> On 06/20/2016 12:17 AM, Dmitri A. Sergatskov wrote:
>> On Mon, Jun 20, 2016 at 12:02 AM, Julien Bect
>> <[hidden email] <mailto:[hidden email]>>
>> wrote:
>>
>>     Le 20/06/2016 à 04:55, Daniel J Sebald a écrit :
>>
>>         On 06/14/2016 10:02 AM, Dmitri A. Sergatskov wrote:
>>
>>             Thanks Ray!
>>
>>             So fltk and qt do it right and gnuplot does it wrong...
>>
>>             Dmitri.
>>
>>
>>         I don't know if this is classified wrong.  The gnuplot toolkit
>>         accepts 'y' as yellow, but that is not a valid color in Octave
>>         (and Matlab?) definitions (only 'k' 'r' 'g' 'b' 'm' 'c' 'w').
>>         That's along the same lines that Octave accepts "endwhile" as
>>         syntax whereas Matlab would throw and error.  In both cases,
>>         different behavior for syntax not defined.  It would be easy to
>>         change 'y' to black for gnuplot toolkit, but I don't know if it
>>         makes a difference one way or another.
>>
>>
>>     'y' is also the shortcut for yellow in Matlab:
>>
>>
>> http://fr.mathworks.com/help/matlab/ref/plot.html?requestedDomain=www.mathworks.com#inputarg_LineSpec
>>
>>
>>     So, Octave should support 'y' in all graphics toolkits.
>>
>>     @++
>>     Julien
>>
>>
>>
>> ​I think the issue here is that marker "point" (.) is defferent from all
>> other symbols.
>> It is kind of a singularity that does not have an internal structure
>> (like border/Face).
>>
>> So setting its borders to black makes entire marker black.
>>
>> Dmitri.
>
> OK, I see what you mean.  Half of the symbols don't have an interior
> (i.e., no face), of which '.' should be one, and it is the
> MarkerEdgeColor that refers to the glyphs of the symbols, not
> MarkerFaceColor.  Create a bug report?  Or lump that in with this one:
>
> http://savannah.gnu.org/bugs/?47974

I placed a bug fix patch along with this post:

https://savannah.gnu.org/bugs/?47974#comment67

There is another fix in the patch to address when the MarkerEdgeColor is
'none' and no points should appear.

If someone knows why this MarkerEdgeColor/MarkerFaceColor should apply
to patches as well, let me know.

Dan