Giter Club home page Giter Club logo

Comments (5)

bjarthur avatar bjarthur commented on June 5, 2024 1

i can reproduce only if i import Cairo, Fontconfig, which is not needed for SVG output.

from gadfly.jl.

bjarthur avatar bjarthur commented on June 5, 2024

is the extra backslash causing the plot to be rendered incorrectly?

would be much easier to help if you boiled the full code down to a simpler example that didn't depend on your package. your OS, julia version, Gadfly and Compose version would help too.

from gadfly.jl.

JohannesNaegele avatar JohannesNaegele commented on June 5, 2024

Apparently the arguments Scale.x_log10, Scale.y_log10 break the output. This example from the docs gives malformated output if I use the log10 scale:

D = DataFrame(x=[0.5,1], y=[0.5,1], x1=[0,0.5], y1=[0,0.5], x2=[1,1.5], y2=[1,1.5])
pb = plot(D, xmin=:x1, ymin=:y1, xmax=:x2, ymax=:y2, Geom.rect, Scale.x_log10, Scale.y_log10);

draw(SVG("./foo.svg", 20cm, 20cm), pb)

The extra backslash makes the svg unreadable.

from gadfly.jl.

JohannesNaegele avatar JohannesNaegele commented on June 5, 2024

Additional info: I am using [c91e804a] Gadfly v1.4.0 and

julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M2
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 1

from gadfly.jl.

JohannesNaegele avatar JohannesNaegele commented on June 5, 2024

i can reproduce only if i import Cairo, Fontconfig, which is not needed for SVG output.

Good catch! MWE:

using Gadfly
using DataFrames
import Cairo, Fontconfig

D = DataFrame(x=[0.5,1], y=[0.5,1], x1=[0,0.5], y1=[0,0.5], x2=[1,1.5], y2=[1,1.5])
pb = plot(D, xmin=:x1, ymin=:y1, xmax=:x2, ymax=:y2, Geom.rect, Scale.x_log10, Scale.y_log10);

draw(SVG("./foo.svg", 20cm, 20cm), pb)

from gadfly.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.