Matlab scatter produces hexagonal symbols instead of circles

9 vues (au cours des 30 derniers jours)
F Poelwijk
F Poelwijk le 3 Fév 2016
Commenté : Hassan le 26 Déc 2019
I am trying to export a scatter plot to eps, but instead of round symbols I get hexagons (same issue with export to pdf or png). My Matlab version is 2015a, and I am using this command:
scatter(X,Y,15,[redcol greencol bluecol],'o','filled');
print(figurename,'-depsc','-r600');
The amount of points in X and Y is around 8000.
Is this a bug?

Réponses (8)

Pete
Pete le 26 Août 2016
I just wanted to comment that this is ridiculous. I'm having to go back to a 2012 release to make decent looking plots. And then I have to rewrite all my code.
  1 commentaire
Jonathan Pillow
Jonathan Pillow le 12 Sep 2016
Unbelievable! I can't believe how stupid this is.

Connectez-vous pour commenter.


Kiran
Kiran le 10 Fév 2016
Starting from R2014b the entire graphics engine was reimplemented. While R2014b graphics makes most of the graphics better it also has some issues, for example, extracting images with circular shaped markers in EPS or PDF file format.
The development team is already aware of this issue and they are considering fixing this for a future release of MATLAB. Unfortunately, at the present moment there is no workaround for this.
The two possible things that the user can do is:
1. Use a different marker shape in MATLAB releases R2014b onwards; or
2. Use prior releases than R2014b.
  1 commentaire
Rick
Rick le 5 Avr 2018
This is the reason I let my Matlab license expire.

Connectez-vous pour commenter.


Jonathan Pillow
Jonathan Pillow le 12 Sep 2016
This is an unbelievably irritating bug. Scatter plots look horrible with these little hexagons instead of circles. I can't believe there isn't any way to use circles (or even a better approximation to a circle) as plotting symbols. The current results are visually terrible.
MATLAB, you seem to be trying your hardest to drive your users into the arms of Python.
  1 commentaire
Pete
Pete le 7 Oct 2016
I agree - unbelievably irritating, and 4 releases later there is still no fix. When making publication quality figures for journals, the circular marker is STANDARD in all types of figures. This MUST be fixed.

Connectez-vous pour commenter.


Sandor Toth
Sandor Toth le 28 Oct 2016
This is indeed extremely annoying. A little help though, I attached an Adobe Illustrator script that can change all selected polygons to circles with the same properties and area. Just rename the file to .jsx (you can check the content of the file if unsure if it is safe) and use the "Script" menu in Adobe to run it on selected objects. Tested in Adobe Illustrator CS6.

Jackson
Jackson le 9 Juil 2019
Modifié(e) : Jackson le 9 Juil 2019
Hi F Poelwijk,
Just two points, here. First is to confirm that Sandor Toth's .jsx script works very nicely to convert hexagons into proper circles in Adobe Illustrator CS6.
The second is that Matlab 2015b (and maybe others) will save points as proper circles circles in PDF files. For example, plot some test data:
plot ( 1 : 100 , rand( 100 , 1 ) , '.' )
See that we're using the '.' marker instead of the 'o' marker? Now save your figure as a PDF and you should get circles. Afterwards, you can use something like Adobe Illustrator to flip from filled circles to empty circles by selecting your data points and using the swap line/fill colour button.
Cheers!
Jackson
  1 commentaire
Djalma Santos
Djalma Santos le 5 Oct 2019
Thanks Jackson!
I've just realized that if print a dot ('.') and change its size, I get a proper vectorial circle.
plot ( 1 : 100 , '.' ,'MarkerSize',10)
Djalma

Connectez-vous pour commenter.


Reed Teyber
Reed Teyber le 6 Déc 2016
Any update?
I do love Matlab, but I am a bit unimpressed with plotting in matlab versus the open source competitors (i.e. matplotlib or gnuplot)

Image Analyst
Image Analyst le 6 Déc 2016
For me they look like circles on the screen:
I didn't print to paper. Maybe your printer resolution is set low, like 75 dpi or 300 dpi or something.
Try specifying different renderers. In print(), specify the renderer as either '-painters' or '-opengl'. Maybe one is better than the other.
If your printer can handle it, specify a higher resolution, like -r2400.
  1 commentaire
Pierre-Pascal
Pierre-Pascal le 23 Mai 2017
Save it as pdf or eps, any vectorial format you use for publication and see how it looks like: crap

Connectez-vous pour commenter.


Gabriel Piedrafita
Gabriel Piedrafita le 13 Fév 2019
I have never experienced this issue with the standard 'plot' command. Don't you get essentially the same graphs turning off the lines connecting the data points? That is why I never use 'scatter'.
plot(rand(10,10),'ko','MarkerFaceColor','k')
  2 commentaires
Rick
Rick le 14 Fév 2019
I think this bug was finally fixed in the most recent releases, after having lingered for years. I stopped paying for a license because I was stuck using 2013b. When I realized the bug had been fixed in 2018 I learned that to renew the licence I had to pay the license fee for all the years during which I couldn't use Matlab. So, I've been getting comfortable with R and Python.
Hassan
Hassan le 26 Déc 2019
I agree..! no matlab any more

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by