Giter VIP home page Giter VIP logo

Comments (8)

mkborregaard avatar mkborregaard commented on June 6, 2024

Good ideas.
A little weird with the super high resolution in GR - I think that may be something new.

from plotdocs.jl.

mkborregaard avatar mkborregaard commented on June 6, 2024

You can use size to define the size of the plot in pixels.

from plotdocs.jl.

t37w avatar t37w commented on June 6, 2024

Thank you for the hint.
I think you mean, one can write (a complete example to be reproducable)

using Plots;gr() # default window size
x=rand(101); y=rand(101)+10; z=rand(101)+100;
foo=plot(x,y,z,size=(450,300))
png(foo,"Try_save_small_png_v003_plot(x,y,z,size=(450,300))")

The problem is, the appropriate function does an upscaling by a factor of 6 for each axis in the png file. This currently means one has to plot into a "stamp" resulting in not nice graphics.
Maybe this was / is correct for the one or the other backend or is an artifact now.
Or do have another syntax in mind?

Cheers,
Thomas

from plotdocs.jl.

mkborregaard avatar mkborregaard commented on June 6, 2024

@jheinen is this expected with GR?

from plotdocs.jl.

t37w avatar t37w commented on June 6, 2024

As addendum to the high resolution of png files. according to the table
http://docs.juliaplots.org/latest/supported/#keyword-arguments
the backend 'gr' does not support the keyword 'dpi'. Could this be one reason ?

from plotdocs.jl.

t37w avatar t37w commented on June 6, 2024

After some more and deeper investigations, the gr-backend reacts on the plot attribute dpi, example:

foo=plot(x,y,z,dpi=300)
png(foo,"Try_save_small_png_v004_plot(x,y,z,dpi=300))")

This results in a png-file which is 3 times larger for each size parameter.
AFAIK, the scaling should make the width and height smaller.

from plotdocs.jl.

t37w avatar t37w commented on June 6, 2024

Proposal of an extended section of 'savefig' in file 'outpout.md'

I have no experience with pull requests, ... as I'm new to github and the related workflow.
In a fork of PlotDocs I have extended the section about 'savefig' in file 'output.md'. Please see
https://github.com/t37w/PlotDocs.jl/blob/t37w_output_savefig/docs/src/output.md

Cheers,
Thomas

from plotdocs.jl.

mkborregaard avatar mkborregaard commented on June 6, 2024

That looks sensible. It's easier to give feedback if you do a pull request. You can do that here on github by going to JuliaPlots/PlotDocs, clicking "new pull request" then "compare across forks"

from plotdocs.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.