graphics

How do I paint/draw/render a dot or color a pixel on the canvas of my window with only a few lines in Obj-C on Mac OS X using Xcode?

假如想象 提交于 2020-03-05 00:25:26
问题 [Edit:] Moving forward from phase 1 of my project here: How do I re-define size/origin of app window in code, overriding nib/xib file parameters, with Obj-C, Xcode 11.3.1 on Mac OS X 10.15.2 (Catalina)? My current objective is pretty simple (at least in the abstract): I want to (re-)color a pixel in my blank Mac OS X application window. I want to do this economically, with as few lines of code as humanly possible, because looking at large chunks of code is a real eyesore. I really did not

Changing the dataset of a ggplot object

匆匆过客 提交于 2020-02-27 05:07:45
问题 I'm ploting subsets of my data with ggplot2 and I was wondering if I would somehow use all the options already contained in a ggplot object in a subset of the original data. As an example, take this is first plot (code chunk 1): require(ggplot2) p <- ggplot(mtcars, aes(mpg, wt, color=factor(cyl))) + geom_point(shape=21, size=4) print(p) Now I want to make a second plot with a subset of mtcars , so I would normally do this (code chunk 2): new_data <- subset(mtcars, disp > 200) p <- ggplot(new

Drawing to main form canvas from a non-main thread

a 夏天 提交于 2020-02-24 16:57:25
问题 I am trying to make an arcade game for my school project. The basic idea is to do all the math and drawing in other thread than the main, and to use the main thread only for input routines. Drawing is done by a procedure saved in an external unit, and is done by creating a bitmap, then drawing parts of the environment on the bitmap and finally dawing the bitmap on the main form's canvas. When I finished the drawing procedure, I tried to run it from the main thread, and managed to make

R base graphics circular histogram

寵の児 提交于 2020-02-24 14:08:39
问题 What would be the best way to draw a circular histogram in R? My data has this form: Dir N 1: 360 56564 2: 0 NA 3: 180 149374 4: 210 82219 5: 240 23315 6: 300 11436 7: 330 30648 8: 30 32198 9: 60 15266 10: 90 14596 11: 120 26267 12: 150 81782 13: 270 10100 I have tried using windrose function from the circular package but it requires input data in another format. I have looked into the graphics:: functions and stars looked promising, but nothing concrete so far. Thanks 回答1: You can try the

R base graphics circular histogram

跟風遠走 提交于 2020-02-24 14:08:35
问题 What would be the best way to draw a circular histogram in R? My data has this form: Dir N 1: 360 56564 2: 0 NA 3: 180 149374 4: 210 82219 5: 240 23315 6: 300 11436 7: 330 30648 8: 30 32198 9: 60 15266 10: 90 14596 11: 120 26267 12: 150 81782 13: 270 10100 I have tried using windrose function from the circular package but it requires input data in another format. I have looked into the graphics:: functions and stars looked promising, but nothing concrete so far. Thanks 回答1: You can try the

R base graphics circular histogram

北战南征 提交于 2020-02-24 14:08:30
问题 What would be the best way to draw a circular histogram in R? My data has this form: Dir N 1: 360 56564 2: 0 NA 3: 180 149374 4: 210 82219 5: 240 23315 6: 300 11436 7: 330 30648 8: 30 32198 9: 60 15266 10: 90 14596 11: 120 26267 12: 150 81782 13: 270 10100 I have tried using windrose function from the circular package but it requires input data in another format. I have looked into the graphics:: functions and stars looked promising, but nothing concrete so far. Thanks 回答1: You can try the

R base graphics circular histogram

∥☆過路亽.° 提交于 2020-02-24 14:08:27
问题 What would be the best way to draw a circular histogram in R? My data has this form: Dir N 1: 360 56564 2: 0 NA 3: 180 149374 4: 210 82219 5: 240 23315 6: 300 11436 7: 330 30648 8: 30 32198 9: 60 15266 10: 90 14596 11: 120 26267 12: 150 81782 13: 270 10100 I have tried using windrose function from the circular package but it requires input data in another format. I have looked into the graphics:: functions and stars looked promising, but nothing concrete so far. Thanks 回答1: You can try the

Behaviour of axis properties with 'yyaxis'

怎甘沉沦 提交于 2020-02-24 11:06:03
问题 Create a figure with two y-axes, using yyaxis: figure yyaxis left hl = plot([0 10],[0 10],'-'); yyaxis right hr = plot([0 10],[10 0],'--'); The following curious behaviour has been found. This has been tested in R2017b and in R2019a on Windows 10. The objects hl and hr seem to belong to the same axis (that is, yyaxis does not create a new axis): >> get(hr, 'parent')==get(hl, 'parent') ans = logical 1 However, the 'children' property of the axis only reflects one object : >> get(get(get(hl,

Behaviour of axis properties with 'yyaxis'

丶灬走出姿态 提交于 2020-02-24 11:05:32
问题 Create a figure with two y-axes, using yyaxis: figure yyaxis left hl = plot([0 10],[0 10],'-'); yyaxis right hr = plot([0 10],[10 0],'--'); The following curious behaviour has been found. This has been tested in R2017b and in R2019a on Windows 10. The objects hl and hr seem to belong to the same axis (that is, yyaxis does not create a new axis): >> get(hr, 'parent')==get(hl, 'parent') ans = logical 1 However, the 'children' property of the axis only reflects one object : >> get(get(get(hl,

java paint problem - black components

荒凉一梦 提交于 2020-02-24 07:51:19
问题 I am having a weird java problem - For some reason quite often when I open a dialog it becomes black. When I force a repaint (for example, draging it out and into the screen again) it draws itself normaly again. The problem seems to occur only on my computer (The same code works for a friend), and its not just one class - it seems that almost every dialogs I open (on different projects) gets this problem. Even JOptionPane.showMessageDialog() gets this problem. Even weirder, it even happens