perl GD Graph 모듈에서 multiple X Axes 표현...

zeon의 이미지

perl의 GD::Graph 모듈에서 multiple X Axes 표현 가능할까요?

여러개의 그래프를 합치는 걸 생각했는데 자동화시키기 힘들것 같아서요.

구현하려는건 한 그래프에 수직으로 여러개의 파형이 동시에 출력되게 하는 건데

잘안되네요.

다른 언어에서라도 이런게 쉽게 구현되 있는게 있으면 추천해 주셔도 감사..

keedi의 이미지

여러개의 그래프를 합친다는 것이...
예를 들면 y=x, y=2x, y=x^2 세개의 그래프를
한번에 보여주는 것 같은 것인가요?

단순히 mixed type이면 그냥 되는것 같은데
이걸 말씀하신 것은 아니지요? ^^;;

multiple X Axes 가 뭔지 몰라서... __;;

---------------------------
Smashing Watermelons~!!
Whatever Nevermind~!!

----
use perl;

Keedi Kim

aero의 이미지

1. 이렇게 한 그래프 안에 여러개의 데이터 세트를 표시하는걸 원하시는지?

#!/usr/bin/perl
 
use GD::Graph::lines;
use strict;
 
# Both the arrays should same number of entries.
my @data = (["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
             "Sep", "Oct", "Nov", "Dec"],
            [23, 5, 2, 20, 11, 33, 7, 31, 77, 18, 65, 52],
            [10, 3, 3, 30, 21, 13, 9, 21, 30, 20, 70, 23]);
 
my $mygraph = GD::Graph::lines->new(500, 300);
$mygraph->set(
    x_label     => 'Month',
    y_label     => 'Number of Hits',
    title       => 'Number of Hits in Each Month in 2002',
) or warn $mygraph->error;
 
my $myimage = $mygraph->plot(\@data) or die $mygraph->error;
 
open(IMG, '>file.png') or die $!;
binmode IMG;
print IMG $myimage->png;
close IMG;

2. 아니면 같이 표시되기는 하지만 데이터 세트들의 숫자 범위(scale)가 다른 축을 사용하기를 원하시는지

3. 그것도 아니면 그래프 여러개가 한 이미지 안에 들어가는 형태를 원하시는지 궁금하네요.

2,3의 경우라면 GD로는 힘들지 싶습니다. gnuplot 같은걸 쓰시는게 나을듯

단지 3의 경우라면 똑같은 크기의 그래프를 생성해서 html에서 보여줄때 테이블태크 안에 넣어서
세로로 줄줄이 이어서 보여주면 될것 같구요.

zeon의 이미지

제가 고려했던건 디지털 파형에다 레벨이 같아서 겹치면 이상하거든요.
한번에 보여야 되는게 문제인데 일단 여러개를 얻어서 나열하는 쪽으로 생각하고 는 있습니다.

더 나은 솔루션 있는 분 있으신가요?

God said it. I believe it. That settles it.

여친이 길르는 용..

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.