[racket] improving image quality
On Wed, Oct 8, 2014 at 9:05 AM, Neil Toronto <neil.toronto at gmail.com> wrote:
> That's what I do for superscripts. LaTeX would definitely be awesomer.
>
> The change to allow picts would be pretty invasive. Everything that computes
> sizes and baselines would have to change. I'd like Typed Racket to prove
> that I haven't forgotten anything, so I'll do it after I convert Plot to TR.
Makes sense. You could allow only picts and do the string->pict
conversion at the boundary (another place where we see a use for
contracts that don't just signal errors (or maybe "contract" is the
wrong word)).
Is making `plot`s result cooperate with pict-convert easier?
Robby
> Neil ⊥
>
> On 10/08/2014 08:24 AM, Robby Findler wrote:
>>
>> I think it would make sense for plot to allow picts as valid #:label
>> arguments and hopefully not too much of a pain to add. (If it is painful
>> for some reason, I'm happy to help.) Then you'd have to make up your own
>> pict.
>>
>> Oh! Or in this case you could use unicode:
>>
>> y = x²
>>
>> Robby
>>
>>
>> On Wed, Oct 8, 2014 at 7:18 AM, Stephen De Gabrielle
>> <spdegabrielle at gmail.com <mailto:spdegabrielle at gmail.com>> wrote:
>>
>> Thanks Robby, my plots are very pretty plots now.
>>
>> Is it possible to have nicely formatted LaTeX style labels on plots
>> instead of "y = x^2"?
>>
>> see this example
>>
>>
>> http://docs.racket-lang.org/plot/renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._inverse%29%29
>>
>>
>> (plot(list(axes)
>> (functionsqr-22#:label"y = x^2")
>> (function(λ(x)x)#:color0#:style'dot#:label"y = x")
>> (inversesqr-22#:color3#:label"x = y^2")))
>>
>>
>> (Racket has just displaced LaTeX and Maxima for me)
>>
>> Thanks & kind regards,
>>
>> Stephen
>>
>>
>>
>> On Wed, Oct 8, 2014 at 2:24 AM, Robby Findler
>> <robby at eecs.northwestern.edu <mailto:robby at eecs.northwestern.edu>>
>> wrote:
>>
>> If you use plot-pict, it will do the right thing.
>>
>> And probably plots should implement the pict-convertible? api.
>>
>> Robby
>>
>>
>> On Tue, Oct 7, 2014 at 7:55 PM, Stephen De Gabrielle
>> <spdegabrielle at gmail.com <mailto:spdegabrielle at gmail.com>> wrote:
>> > Hi,
>> >
>> > I'm learning some scribble, along with adding some images
>> from plot.
>> >
>> > This works nicely, but i'm trying to work out how to improve
>> the image
>> > quality in the resulting PDF. (the html output is fine.)
>> >
>> > is there any way to make my images sharper and clearer in PDF?
>> >
>> > kind regards,
>> >
>> > Stephen
>> >
>> > ----
>> >
>> > #lang scribble/base
>> >
>> > @(require plot racket/math)
>> >
>> > @title{Math 135 Assignment 1}
>> > @section{First Test}
>> >
>> > @(define ((deriv f) x)
>> > (/ (- (f x) (f (- x 0.001))) 0.001))
>> > @(define (thrice f) (lambda (x) (f (f (f x)))))
>> >
>> > @(define (x^2 x) (* x x))
>> >
>> >
>> > @(parameterize ([plot-width 150]
>> > [plot-height 150]
>> > [plot-x-label "xaxis"]
>> > [plot-y-label #f])
>> > (list (plot (function x^2 (- pi) pi))))
>> >
>> >
>> >
>> > ____________________
>> > Racket Users list:
>> > http://lists.racket-lang.org/users
>> >
>>
>>
>>
>>
>>
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users