Grid-lines in "print" to png appear black always, not grey

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Grid-lines in "print" to png appear black always, not grey

Tim Pierce
Octave 4.0.0

code:

    figure
    plot( 1:100 )
    grid on

I can see that the second graph down has an example of nice grey (as per the window) 

The figure looks like this in Octave

Inline images 3

It prints to test.png like this

Inline images 2

I have been through all the gca settings I can see, relevant. There's a LOT.
The printed plot respects none of them

If anyone could help diagnose this it would be appreciated

Tim

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Grid-lines in "print" to png appear black always, not grey

Tim Pierce
Very sorry, correction -
Octave 4.2.1 (Win)

On 18 August 2017 at 05:35, Tim Pierce <[hidden email]> wrote:
Octave 4.0.0

code:

    figure
    plot( 1:100 )
    grid on

I can see that the second graph down has an example of nice grey (as per the window) 

The figure looks like this in Octave

Inline images 3

It prints to test.png like this

Inline images 2

I have been through all the gca settings I can see, relevant. There's a LOT.
The printed plot respects none of them

If anyone could help diagnose this it would be appreciated

Tim


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Grid-lines in "print" to png appear black always, not grey

tmacchant
>Octave 4.0.0
>>
>>code:
>>
>>    figure
>>    plot( 1:100 )
>>    grid on
>>    print( 'test.png', '-dpng ','-S500,500', '-color' )
>>
>>In https://engineeringliberty. wordpress.com/2011/10/07/ making-great-plots-in-octave- and-matlab-too/ 
>>
>>
>>I can see that the second graph down has an example of nice grey (as per the window) 
>>
>>
>>The figure looks like this in Octave
>>It prints to test.png like this
>>I have been through all the gca settings I can see, relevant. There's a LOT.
>>The printed plot respects none of them
>>
>>If anyone could help diagnose this it would be appreciated
>>
>>Tim


>Very sorry, correction - 
>Octave 4.2.1 (Win)
>


This is a limitation of openGL (qt and fltk) and -dpng printing devise.

For Octave 4.2.1 (Win), dpngcairo can be used on gnuplot graphics_toolkit.
Try 

graphics_toolkit gnuplot

figure
plot( 1:100 )
grid on
print( 'test.png', '-dpngcairo','-S500,500', '-color' )


Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Grid-lines in "print" to png appear black always, not grey

Tim Pierce
Thanks! That seems to work.

didnt see the cairo stuff documented, butit works, thanks.



On 18 August 2017 at 08:26, Tatsuro MATSUOKA <[hidden email]> wrote:
>Octave 4.0.0
>>
>>code:
>>
>>    figure
>>    plot( 1:100 )
>>    grid on
>>    print( 'test.png', '-dpng ','-S500,500', '-color' )
>>
>>In https://engineeringliberty. wordpress.com/2011/10/07/ making-great-plots-in-octave- and-matlab-too/ 
>>
>>
>>I can see that the second graph down has an example of nice grey (as per the window) 
>>
>>
>>The figure looks like this in Octave
>>It prints to test.png like this
>>I have been through all the gca settings I can see, relevant. There's a LOT.
>>The printed plot respects none of them
>>
>>If anyone could help diagnose this it would be appreciated
>>
>>Tim


>Very sorry, correction - 
>Octave 4.2.1 (Win)
>


This is a limitation of openGL (qt and fltk) and -dpng printing devise.

For Octave 4.2.1 (Win), dpngcairo can be used on gnuplot graphics_toolkit.
Try 

graphics_toolkit gnuplot

figure
plot( 1:100 )
grid on
print( 'test.png', '-dpngcairo','-S500,500', '-color' )


Tatsuro


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Grid-lines in "print" to png appear black always, not grey

bilborigami
In reply to this post by tmacchant

>  This is a limitation of openGL (qt and fltk) and -dpng printing devise.
>
>   For Octave 4.2.1 (Win), dpngcairo can be used on gnuplot
> graphics_toolkit.

I have the same problem with the use of print and gridlines.
I am using Octave  4.2.1 with Linux Mint 18.3.

The solution proposed by Tatsuro doesn't work with linux. It seema that
gnuplot is not available, neither the Cairo thing.

Can it be fixed for linux?



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Grid-lines in "print" to png appear black always, not grey

Pantxo
bilborigami wrote

>>  This is a limitation of openGL (qt and fltk) and -dpng printing devise.
>>
>>   For Octave 4.2.1 (Win), dpngcairo can be used on gnuplot
>> graphics_toolkit.
>
> I have the same problem with the use of print and gridlines.
> I am using Octave  4.2.1 with Linux Mint 18.3.
>
> The solution proposed by Tatsuro doesn't work with linux. It seema that
> gnuplot is not available, neither the Cairo thing.
>
> Can it be fixed for linux?
>
>
>
> --
> Sent from:
> http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
>
> _______________________________________________
> Help-octave mailing list

> Help-octave@

> https://lists.gnu.org/mailman/listinfo/help-octave

If you don't actually need transparent grid line and can live with gray
lines then see the workaround in bug #49705.

Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave